#gameplay-ai

1 messages · Page 155 of 1

mossy nexus
#

if they are not "it", it looks like you want them to move to random locations right?

pseudo drum
#

no im just testing out the it actor right now

#

so they will move around randomly if another actor is not in sight

mossy nexus
#

yep ok

#

that's fine

#

so we can leave that for now

pseudo drum
#

thats why i have the blackboard bool set in the perception update

mossy nexus
#

I don't know what you mean by that

#

but

#

for the path where they are "it"

#

you need the decorator that says IsActorIt

#

and it should be set to Abort Both

pseudo drum
#

abort both?

#

im confused. are we still talking about getting the it actor to move to the non-it actor?

mossy nexus
#

yes

#

first we have to make the tree work

#

then we can take a look at the tasks

#

if the tree doesn't work

#

the tasks won't run

pseudo drum
#

ok so

#

like that?

mossy nexus
#

you don't need the blackboard condition

#

you just need the "it" condition where the blackboard condition is now

pseudo drum
#

ok

mossy nexus
#

so let's quickly review what's happening here

#

the tree starts, it will check the leftmost path first. if it's not it, it cannot go through the IsActorIt decorator

pseudo drum
#

right

mossy nexus
#

so it reevaluates, and moves to the right

#

and checks if it can go to that tree

#

which it can

#

because there's no decorators

#

if an actor is "it", they will use the leftmost branch

pseudo drum
#

yes but i need my it actor to use both of those sequences depending if they see an actor or not so why do I not need the blackboard conditions?

mossy nexus
#

that doesn't make sense

#

as long as an actor is "it", they aren't suddenly going to act like they are not "it"

pseudo drum
#

well my it actor isnt moving anymore

mossy nexus
#

it's too early to test, we haven't had a look at anything yet.

pseudo drum
#

ok nvr mind its doing the flickering thing again

#

alright so whats next

mossy nexus
#

now let's take a look at your nodes

pseudo drum
#

ok

mossy nexus
#

have you checked with breakpoints that your perception event gets triggered?

#

that will also allow you to see if you indeed have the correct blackboard pulled up

pseudo drum
#

I only have one blackboard

mossy nexus
#

yes but a blackboard could also be a null value

pseudo drum
#

ok so how do i use breakpoints

#

i know my ai perception is working because i used print string

mossy nexus
#

F8 while selecting a node

#

then you run the game and let that event happen for instance

#

and the game will pause once it hits the breakpoint

#

while paused, you can hover over pin previous to the node you're on and see their values

pseudo drum
#

ok im pressing f8 on a node and i dont think its doing anything

#

i should be doing it on the on target perception node?

mossy nexus
#

do you get a red dot

pseudo drum
#

no red dot

mossy nexus
#

take a look at that page

#

there's a section called breakpoints

#

when something breaks in your BPs, breakpoints are your best friend

pseudo drum
#

ok i just added one through the menu

#

so on which node exactly should the breakpoint be on

mossy nexus
#

well we can start with the perception event

#

and see if that even triggers

pseudo drum
#

yea it did

mossy nexus
#

cool

#

so now at the top of your BP graph you have some new controls

#

step over, step into etc.

#

so now try and step past the branch and see if that's possible

pseudo drum
#

yep

mossy nexus
#

just using step over

pseudo drum
#

ok it moved to cast to bp_myAi

mossy nexus
#

as long as it moves it's fine, if the game resumes, it means it didn't execute the next node

pseudo drum
#

ok

#

oh wait

#

i couldnt step over past the branch

mossy nexus
#

so that means that condition fails

pseudo drum
#

oh ok

#

so the true is not working?

mossy nexus
#

if you want to be certain you can put a print statement on false

pseudo drum
#

no the true statement is working

mossy nexus
#

ok, so why wouldn't it move past?

pseudo drum
#

um ok well it is now

mossy nexus
#

I mean it may be that this is intended

#

is the bool only true when it spots another AI?

pseudo drum
#

yes

#

well

#

once an ai moves out of sight, the bool will turn false automatically right?

stuck comet
#

does GetTeamAttitudeTowards() get call everytime ai_sight detect actor or just once ?

#
ETeamAttitude::Type AMinionAIC::GetTeamAttitudeTowards(const AActor& _Other) const
{
    const IYOLOPawnInterface* Other = Cast<IYOLOPawnInterface>(&_Other);
    
    if (Other && MinionC)
    {
        if (MinionC->Team.MatchesTagExact(Other->GetTeam()))
        {
            return ETeamAttitude::Friendly;
        }
        return ETeamAttitude::Hostile;
    }
    return ETeamAttitude::Neutral;
}
mossy nexus
stuck comet
#

im trying to implement my custom logic to detect affiliation

#

but look like 'GetTeamAttitudeTowards(const AActor& _Other)' just get called once

pseudo drum
mossy nexus
#

again I don't know what it does

pseudo drum
#

i have a blackboard bool key for if an actor was in range, id set to it to true with that branch

#

and that was my blackboard decorator to tell the it actor to move to the AI

mossy nexus
#

ok I don't know how the perception works with AI because I've used my own component for this

#

but ideally you want to collect as much info about your target as you need

#

so not just the range, but also who the target is, if there are more targets as a fallback etc.

pseudo drum
#

the it actor dosen't need that because no one else is it. i just need it to move to whoever they see.

mossy nexus
#

right but what if that target goes out of sight?

#

like you have to account for failstates

pseudo drum
#

well thats why i had the condition so they would move to random positions

mossy nexus
#

ok so we need a sub branch on the left side

#

and another decorator

#

now you want to distinguish between when a target is in sight, and when they are not

pseudo drum
#

yes

mossy nexus
#

but just to be clear

#

that's not the same as what you had before

pseudo drum
#

ok

mossy nexus
#

so can you take a screenshot of your blackboard currently

pseudo drum
mossy nexus
# pseudo drum

ok so you need the target that you are chasing as a bare minimum

#

and really, instead of having bools for in range and it

#

you should have decorators that check against a range you define, so it becomes a function of distance

#

the reason it's better to have a target as a key is because you can then at any time extract information like location

#

and equally you can use the fact that there is no target to put your AI into looking for new targets

#

as for IsActorIt

#

there was a function on the game mode that gave that result

#

so you can just query the game mode for that result instead of having it as a blackboard value

#

otherwise you're just repeating information

pseudo drum
#

okay so first, i should put the target into a key

mossy nexus
#

yes

#

and really

#

nothing else

#

all other information can be extracted from the target

#

or the game mode

#

or the current AI

pseudo drum
mossy nexus
#

you can test range by checking distance between current AI and target

#

you can check for it on the current AI or the game mode

#

both of those can be custom decorators

#

I would avoid as much as possible using the built in decorators, as they are buggy

mossy nexus
pseudo drum
#

im not sure

#

i don't know how to test that

#

r u asking if the key will change objects whenever the it actor sees different actors?

mossy nexus
#

I'm asking because I don't know if you are ever resetting the target

pseudo drum
#

yea i dont know i only know how to use bool

mossy nexus
#

like for instance, when the target is out of the vision cone, it should probably set itself to false

#

well you just set it to nothing

pseudo drum
#

it seems easier to try to get the actors location inside the behavior tree if thats possible

mossy nexus
#

you actually don't even need the actor's location

#

MoveTo accepts actor keys as an input

pseudo drum
#

wait is that a way also? If i pass the position to a blackboard key and use a MoveTo? I havent tried that.

#

gonna try it out really quick

#

huh well it kinda works

mossy nexus
#

I mean that's kind of the standard MO for MoveTo

#

I have no idea what you were doing before

#

anyway no biggie

#

so you should ideally set up the other branches of the tree as well

#

what i would recommend for the non-"it" branch would be to put down 3 tasks

#

in sequence

pseudo drum
#

wait before we do that, my it actor is having an issue. it might be the null thing.

mossy nexus
#

task 1: find new location in radius
task 2: move to new location in radius
task 3: wait x seconds
and put a loop decorator set to infinite on that

#

sure ok

pseudo drum
#

ok so when the it actor touches another actor, both seem to get stuck on each other

#

i think its because when they are always moving towards each other if both are in sight

mossy nexus
#

both become "it" momentarily, find closest actor, then set that actor to be "it"

pseudo drum
#

yea

mossy nexus
#

there's a few ways to get around this

#

but you'll have to find whatever suits you the best

#

a grace period is probably wise

#

you could combine that with the actor just having been it being untouchable for a grace period as well

pseudo drum
#

and actually

#

i want a way to see whos it or not

#

because its hard to keep track of each actor by color

mossy nexus
#

well being that the game mode knows who is it

#

you can just query the game mode in a widget

#

to have it displayed always

#

but that's no longer AI

pseudo drum
#

yea ill hold off on that for now

#

ugh somethings not right

#

how do u make something null

mossy nexus
#

just set the value to nothing

north finch
#

Hi everyone, can anyone confirm if the Gameplay Tags Test for EQS query works? doesn't seem to work on mine on both ue4 and ue5.

misty wharf
#

It should work just fine

#

Actors you are testing against need to implement the gameplay tag container interface though

north finch
misty wharf
#

Correct

#

There's no way for it to know how to read your gameplay tags unless you implement the interface

north finch
#

thanks

dark briar
#

So I'm trying to explore EQS and i was going through a unreal talk where i saw this EQS Generator called "Context: Set of" I tried to find it in my UE but i'm unable to find it. is it a custom Generator?

pine steeple
#

yes it is custom

dark briar
#

ok thanks for the info

misty wharf
#

That's an interesting generator lol

dark briar
# misty wharf That's an interesting generator lol

ya lol, unfortunately the talk was in japanese so i couldn't understand but thanks to youtube auto translate and some of the ppt images, i could understand that he was trying to tell that enemy targeting system can be achieved with EQS . but he didn't explain what the generator does. i'm guessing it just returns the enemies currently in the map

misty wharf
#

Yeah seems likely based on the description text

#

Uses the selected context to return a set of actors

crimson galleon
shadow sierra
#

Not sure if this is the right channel, but I am getting crashes from the navigation system.

The usage is quite simple, there is a navmesh in the world and there are characters which find a random point and move to it and repeat

#

Another crash that i get, it alternates between these errors

dapper spear
#

Which do you prefer for your AI? physical animations or just using animations for either hit reactions or death?
I like physical animations but at times the behavior is too random.
So far I played around and also some games that its better for the ai to have no collision on other ai and the player but still react to hits from the linetrace.

ocean wren
#

Yeah, having hard collisions on AI is generally a bad idea imho.

#

I usually just use a seperation force to keep them from interpenetrating

#

still have the capsule colliders on the agents, but set them to not collide with each other

dark briar
celest python
#

And makes me wanna learn Japanese

dark briar
ocean wren
#

Try looking for Eric Johnsons version of that same talk. Eric was working at squeenix back at that time and he was the one who gave the english language version.. he might have slides up somewhere?

#

Ah, Eric's at Kojima now

#

Dammit 🙂

ocean wren
#

Well that sucks

ocean wren
#

Because the movement of AI characters doesn't do well with rigid collisions

#

imagine you have a group trying to get through a doorway, having rigid collisions can easily block that kind of setup really easily

#

Often, we see games AI where they disable rigid collisions and switch to soft collision response (where you simply push actors apart) and they just have a bit more wiggle room for edge cases

#

Some games if they detect protracted collisions between two agents that have opposite path directions, simply swap their positions

uncut rune
#

ah ok, that's good to know.

grizzled bolt
crimson galleon
#

looks legit

misty wharf
#

I guess japanese studios are increasingly moving away from in-house studios nowadays

#

since it seems there's an increased amount of content in japanese regarding gamedev

#

it's actually not a very hard language... except for the writing system lol

unique python
#

Hello,
maybe this is not the correct channel to post this, but it has to do with behaviour trees and ai mostly, so I hope it is fine.

I'm developing a VR game, where you can feed animals. So there is a pickup object, that is the food.
The animal is controlled by aicontroller - when it sees the food it goes there. But I also implemented a sphere collision into the animal character BP, that destroys the food object on overlap. This way the animal "eats" the food.

My problem is that when the animal character is already moving it loses the object on the goto node, and tries to go to the center of the world.

Is there any way to abort movement or jump to another task, when the object defined in the blackboard as a goto target object gets destroyed?

I will try to give enough screenshots so it is obvious what is happening.
Thanks in advance.

#

the second screenshot is the go to food location task, that after the goto sets freeroam boolean to true

ocean wren
#

Why are you using a blueprint moveto?

#

Oh youre not

#

So you're logic looks a bit wonky

#

What is the animal supposed to do if it doesn't want food?

#

usually, I'd have a value "food need" and increase it over time

#

then have some logic that runs if food need > some threshold

#

the "go get food" would only run if food is in the blackboard to go and get

#

so you'd need a BB entry for that

#

otherwise, you'd do some idle wandering around (because food need would be too low to trigger the "go get food" branch

#

So basically, think of it as priority, higher priority trumps lower.. so lowest is idle, middle is needing food but not having it, and highest is knowing where food is and going to get it..

#

that kind of thing

crimson galleon
#

to what zoombapup is saying, whether this solves the immediate problem, this is a finite state machine, the AI must always have a state to go to - there should be a failsafe state as lowest priority for then no other conditions are met (idle in this case) with higher priorities to override as mentioned.
The bit im curious over is how the BBkey for location is being set. I see it for the moveto, but what is given it a value?

ocean wren
#

Hmm, I've got to think of some AI thing to do when a floating point value goes up and down.. I was thinking of going between peaceful and rioting, but I dunno 🙂

unique python
#

So what it is supposed to do
left side is freeroam, right side if it senses food (with ai sense)
when it senses food - it stores that food in a bbkey - as an actor
then the freeroaming is set to off
then he goes for the food, but since the food can be held by player and thrown at the animal - it can happen that the food object is destroyed before finishing the move to - and that where it begins to break

I suppose that I should be doing everything in the behaviour tree - but I can't figure out how to do the eating (food object destroys - animal plays eat animation ) inside the behaviour tree
thanks @ocean wren for the thresold suggestion, it is a good idea, I will definitely implement something like that later

#

this is how the vector value for object location was stored, but I changed it to an actor variable - because if the player moves away the animal follows that way

#

so this is how it is stored now

#

and this is what happens when the animal character "eats" the food object

#

and this is what happens in the food object - so it is detached from the VR hands - and then destroyed - as touches the animals head

#

sorry for the wonky BP screenshots, I'm extremely beginner - but I still feel the main problem is with the behaviour tree - like when the food is eaten - I should change for a different behaviour tree task - so it can play the character animation instead of the character BP playing it.

ocean wren
#

Yeah, so you're logic is the wrong way round.. the priority goes leftmost = highest to rightmost = lowest

#

so you should have your lowest level "do something if nothing else is more important" on the right

#

then as things change the blackboard, you can respond to those changes based on conditions

#

the leftmost should be the most specific thing, so things like sensing food that is available might set a value in the BB for the food.. that would then cause the higher priority path to move towards it taking over the lower priority idle

#

and each bit of new information is shoved into the blackboard to allow subtle differences in behaviour

#

so for instance, that threshold value would mean you don't have ALL animals coming for the food once they'd eaten for instance

#

or, you might have a "can I get a path to the food" as a condition on some higher priority branch to come and get food, which would fail if you can't reach it etc.

#

Usually its best to write out what priority you want the behaviour in and what preconditions must be in place to make those work (write it in your normal language first) then encode that into behaviour tree + conditions

stuck comet
#

is there any tutorial/insight how to handle AI aggro/hit player if the player hit certain character/Ally of the AI

crimson galleon
#

like an AI gets notified when an AI buddy gets hit?

stuck comet
#

yes

crimson galleon
#

for AI that talk to one another, a middle "man" class is best

#

like an AI manager

#

ive not done this, but have something like it, so ill give you my take

stuck comet
#

i want to create minion like MOBA game

crimson galleon
#

i dont know what that is

#

sounds like an AI manager though if thats the case

stuck comet
#

any tutorial/example i can learn from ?

crimson galleon
#

AI manager is probably a good term. might not find a minion moba, but should probably fine the answer to the concept

stuck comet
#

ok thanks

crimson galleon
#

let me check something too

#

nvm, sorry

ocean wren
#

I use a manager class that organizes the squad, I use a messageendpoint to coordinate between them, when any of them get hit, it sends a message to the squad manager that its been hit, it also does the same for when it spots an enemy or hears a sound etc.

#

The squad manager class tells the squad members about the information sent from each other

#

Its basically like a sort of squad radio, but done as message passing

#

For the specific use case of aggro, the manager class would need to keep a list of enemies and how much of a percieved threat they are (increase every time they do damage for instance) and would assign the squad members to the highest threats with checks for if the squad member can reasonably do damage to them etc (in my case, testing line of sight so they can shoot back and whatnot)

#

There was actually a nice presentation about this in one of the GameAIPro books if I recall. lemmie see if I can find it

crimson galleon
#

tactics and strategy i think

ocean wren
#

Dammit, trying to remember where it was

#

Anyway, posting this here, as its something a bunch of people should know about

#

Ah it was Chris Jurney

#

Only, the aiwisdom site is dead.. sheeit

crimson galleon
#

seems to work for me 👍

ocean wren
#

Try clicking on a link

crimson galleon
#

i did, both

ocean wren
#

And you don't get a dead link?

crimson galleon
#

i see that

ocean wren
#

Yeah, I'm talking about clicking one of the articles

#

the host of the content seems to have gone away

crimson galleon
#

ah

#

yeah

#

they old dates though

#

bummer

ocean wren
#

yeah, sad

crimson galleon
#

i can always copy paste these though

ocean wren
#

Ah well, can't be helped, the internet is fickle 🙂

crimson galleon
#

the fool! if DOIs were used from the start we wouldnt have this!

ocean wren
#

DOI?

crimson galleon
#

its for permanent web addresses

#

digital object identifier

ocean wren
#

Well, it isn't the web address so much as the hosting going off 🙂

#

unless you're saying that there's some magical internet thing that automatically keeps internet things online even without a host? cos thems some magical beans 😉

crimson galleon
#

i think the links dont work anymore because they are old (~2003) so the links used probably point to something unfound and it defaults to the web hoster "dunno" page

#

i think the DOI has to be approved or something, but it is permanent

#

website explains it all

ocean wren
#

Yeah, I guess nobody wants to host old stuff 😉

crimson galleon
#

i think the links to the places revamped the site so the links were changed for that revamp. kinda like gamasutra becoming gamedeveloper - honestly harder to finder gamasutra articles with something so generic >.<

ocean wren
#

Hmm, seems it went away sometime before 2013 🙂

crimson galleon
#

really? i thought they changed the last year or so, because I will go to gamasutra regularly

ocean wren
#

No, I meant AIWisdom

crimson galleon
#

ah

ocean wren
#

Apparently Chris Jurney is now head of development for Facebook VR

little swan
ocean wren
#

That's not the one I was thinking about. Chris did a talk about selecting how to attack in Warhammer? Actually, thinking about it, it might be on GDC youtube channel.

little swan
#

yeah, i haven't seen Chris's talk, though i recalled this one had similar to what you mentioned about there being an squad manager/commander

ocean wren
#

Yeah, its a pretty common setup. I'm sure there's a bunch of similar papers and articles doing it

little swan
#

yeah

unique python
#

and on the old unreachable sites it is a good tip to try https://web.archive.org/ - here you can enter URL-s and see snapshots of them in earlier times - the site that you tried to open is also there in the 2009 snapshots

ocean wren
#

Sadly didn't archive the actual book chapters. Which is a bit of a problem.

uncut rune
#

Question: I have a box component attached to my door that acts like a nav modifier that is set to a custom area with an extremely high cost. This is to prevent my AI characters from trying to walk through the door. However, the box component is very thin, but the area that it covers is very large in comparison. The first image below is the area that it covers and the second image is the actual size of the box. I'm wondering why it's so inaccurate?

misty gale
#

I think this is due to the navmesh resolution

uncut rune
#

ah ok, it's because my agent radius is too high.

#

thanks

cobalt palm
#

Hello, just need some advice. I have some ai that are to wait at a register to "purchase" their items. However, as of right now it is just a go to task. I would like it to be a little more realistic and have it where they go to a point to make it look as if they are waiting in line if the first point is already taken.

What would be my best approach?

crimson galleon
#

Probably best place the spots on the line as maybe there are different store layouts. Then keep track of which is the next available spot in line. Alternatively, you could get the last pawn in the line and set the move to location an offset distance behind them. It may also be better to derive the offset direction from the register and not the pawn as the pawn might have off rotation. It would still use the pawn location just the directional offset from the register.

cobalt palm
# crimson galleon Probably best place the spots on the line as maybe there are different store lay...

Hm. When my ai goes to different places ie: registers, and shelves, I have a public vector on the base classes that can be seen ingame.

Would it be plausible to have per say a struct map on the register where the struct contents are a vector and a bool so that when an ai gets to a point, it sets that bool to true? Or maybe have a vector array and a counter that goes up each time a customer moves to the spots, and goes down when one leaves?

crimson galleon
#

I kinda like the counter because that give you the index of which vector location to go to

#

I wonder if its possible to use eqs from the register to determine location, just wondering though

cobalt palm
crimson galleon
#

Ah, mighy too tricky then eqs in general can be a bit much and what im thinking seems even more specific

cobalt palm
crimson galleon
#

It could be. I think youd have to make some logic for it

cobalt palm
crimson galleon
#

Eqs could generate a grid of points, filter out actors occupying certain points (as well as collision) and the tricky bit is having the right position to move to from it

cobalt palm
crimson galleon
#

Eqs can generate a grid of points that exist in the navmesh

#

Its sort of all within eqs

celest python
#

I guess we can not extend C++ BTTask's to BPs right?

crimson galleon
#

I dont think you can extend but you make your own bp version

silk fulcrum
#

Anyone have good resources they can point me to on how to setup bots for a dedicated server game? Not from a BT perspective, but from a how to spawn them? i.e. from game mode or not, etc?

crimson galleon
#

game mode is the place for handling spawning of characters as game mode accesses player starts

silk fulcrum
#

Yeah, I surmised it should be in game mode, but I was curious about where specifically I should place that logic based on the initialization order within game mode

#

HandleMatchHasStarted() seems to spawn the players, should I extend that and also spawn my bots at that point? It seems to be tracking bots before this point though internally, which caught me off guard

crimson galleon
#

i think there's a more direct function to override, but i cant recall the names

#

i wanna say ChoosePlayerStart

#

honestly not sure if that works for bots, i assume so

silk fulcrum
#

Yeah curious if there's any way to spawn a bot such that its able to go through RestartPlayer

#

And take advantage of the same spawn logic

ocean wren
#

For stacking up on doors, I created a component that stored positions and just queried for that component on the door object if I wanted to stack on it. Using components to annotate things is generally a good approach. You could create a "queue" component that you'd query on your till to get points to queue at. The reason to use a component, is that you can add editor gizmo's and stuff to it to visualize when you select the object

#

I had a queue component for ladders, because generally they are one-way traffic queuing systems

#

The ladder queue had to do some logic for which was the current ladder direction (so agents could go up or down it but not both at the same time)

#

Its kind of similar to smart objects, in that its something in the world that tells the AI how to use it. Just a bit simpler in reality 🙂

grizzled bolt
#

For AI opening doors, I am doing it like this :
when AI reached the smart link on the door BP, the door BP will set the AI's Blackboard key DoorActor to the door BP. AI's BT has a branch which checks if DoorActor is set, if it is, it will execute a bunch of actions to open door and clear the DoorActor once the door is opened.
I am wondering there is an easier/proper way to do this?

celest python
#

Something makes my pawn move but my BT disabled and BrainComponent is resource locked. VisualLogger says pathfollowing comp is active and BT is running. I'm also sleepy so probably I'm missing something but anyone has any idea what could be making my pawn move?

#

BT is not even connected

ocean wren
#

Did you save it? 🙂

#

Xeon: That's a reasonable way of doing things. Just breaks down if you have to manage multiple agents competing for the resource (the door), I like the idea of having the logic of use in the object of use (wow that sounds like a nice meme) so that it can direct its own usage to the agents trying to use it. So for a door, what if two agents try and use it at once?

grizzled bolt
ocean wren
#

Yeah, essentially, you'd say "you're currently interacting with something" in the BT, the interacted-with object would tell the AI what to do until its finished with the interaction

#

Its typically called a "Smart Object"

#

the Smart Object thing started with the sims franchise.. at least that's where I first heard of them. The SO idea is that it also broadcasts its utility for general usage, so good for spatially seperating objects (i.e. AI will do different things depending on where the nearest satisfier of a need is)

#

Good examples of more recent smart objects.. Bioshock Infinite, there's a great presentation from GDC by John Abercrombie (now at Epic) on it

#

probably a bunch of chapters on gameaipro.com too, I wrote about some of this myself

#

I wrote a paper about social objects.. a sort of social version of the smart object, for things like parties and conversations

#

think of it as a more localised and smaller form of AI director.

#

typically used as a coordinator in multi-agent systems

#

around the 24 minute mark. They called it "smart terrain" apparently

grizzled bolt
ocean wren
#

That's a bit of a grey area. In general yes, because the smart object wants to give it a list of things to do

#

But in reality, the BT can still override if a higher priority task tells it to

#

The reason you want the smart object to control the interaction, is because its likely to have more info and be more recent than the character (these things were intended as add-on packs for DLC usage)

#

I think you'd have to play with the coordination somewhat, but just a branch that essentially idles whilst in a smart object interaction seems reasonable

#

So you'd generally keep both

#

I actually do my "actions" as a task queue anyway, so my smart objects just pushed actions into the task queue, I don't do actions as part of the BT. My BT's just choose which actions to push, and monitors them for completion

#

That way I can go entirely scripted by simply pushing a list of actions. Or I can mix and match BT and actions and smartobjects

celest python
#

I was moved the BT's to another folder in the editor. This started to happen after that. Probably something is messed up with blueprints again, yet still it does not make sense 😄

#

Debugger also confirms the BT is running, even while nothing is connected to root selector

cobalt palm
# crimson galleon I kinda like the counter because that give you the index of which vector locatio...

I ended up going to counter and the multiple vector route and it seems to have worked. So once a point has been found, the ai moves to it and the index is increased so that the next customer goes to the point behind them.

Now I am trying to get it so that this purhcaseitems only runs when a bool in the register is true, meaning there is someone at the register. I have tried a loop in the purchaseitems that loops until that bool is true by I keep getitng an infinite loop error.

crimson galleon
cobalt palm
# crimson galleon since you have an index which is specifying which vector location an AI is in, c...

Hm. I might be able to recode it a bit nicer however, the index I have is in the register class that I use to get a new vector for the next ai to go to.

However, I see what your saying is to cross check the vector location I want the ai to be in to do the task. But that now brings up another problem where, as you can see, there is only a task go move the ai to a spot near the register, then purchase. I never figured out how to make a sequence or a task that would make sure that the ai is in the correct spot to purchase and if not, move to the next index for the register if that makes sense?

crimson galleon
#

so you have them move, but there is no double-check on if they actually made it?

cobalt palm
#

Kind of. I pick a register, and get the registers index to which I then find a vector point in the array to go to. Now I only want the ai in the 1 element of the array to our purchase, then, he leaves and the AI's that were in line move up one vector(ie getting their index and going down one) until they are at the 0 index to which they can then execute the purchase task.

crimson galleon
cobalt palm
crimson galleon
#

on end overlap tell the AI in the line?

#

actually, i bet you could have the AI follow one after another once they get in line

#

well, that'd probably have you reworking some things

#

just thinking about how each AI would need to shuffle forward

cobalt palm
#

So I could create an object array in the register bp that holds all the ai in line, each ai can have an index variable that can be used to get the next vector. Then once that ais index = 0, they do the purchase task?

cobalt palm
crimson galleon
#

i think the index variable makes sense, you've already got that in action from when they move to queue up

#

the register could tell each AI to move up with a delay i guess, maybe slight variation in delay so its not too uniform

cobalt palm
crimson galleon
cobalt palm
#

I need more experience.

crimson galleon
#

well, thats not where i was going

cobalt palm
#

Oh 😂

crimson galleon
#

since its this deep in, just look at everything thats going to be needed, maybe you have that, but plan out every little nuance on paper

#

i think its good to start working on it to see how it all works and how detailed it gets

#

i would do the same, and now the inner voice inside me is saying " take a step back from all of this, list out all the things this ai needs to do, check it over again and make sure every little action is addressed, and then figure out a plan to execute it"

cobalt palm
# crimson galleon i would do the same, and now the inner voice inside me is saying " take a step b...

Will do. The reason I have been bugging you so much is because I have created a couple games before that I just ended up stopped doing because it was "too much". However, ai is something I haven't really worked with before in school so although I am having issues, I somewhat understand this is just me learning something new. I will definitely plan this out and take a look at it. Now, once I do, I know I will want to keep going, so I will most likely be here in a day or so. 😅

crimson galleon
cobalt palm
crimson galleon
#

ah thats a shame

#

sounds like there is a bigger hurdle than learning a new concept

cobalt palm
#

That's why I'm not going to stop with this game, and is also why I keep bugging you here is because of certain things I don't know.

crimson galleon
#

great, that's the right attitude, dont quit on it

#

get use the feeling and idea of cutting your ideas though, not everything can make it in, sometimes we have to look at what is working and make something of that then force all the initial ideas in

#

no wants to make a bad game or a game they know can be better, but time is the key. keep the notion in mind that this game should've been finished yesterday, that it should have shipped. Maybe the art isn't great, but it feels complete already. Then get it out there, keep working on it and you'll hear plenty of feedback from people who play it; what they want; what they dont like, etc

#

/ rant over

#

cool. well, regarding the AI, i have suggestions, but i think the best way to advise to know all the details of whats to be achieved

#

from an AI book, i read that "the amount of work which goes into AI is not necessarily the work performed by the AI"

cobalt palm
#

Ok. Tomorrow I'll try and get a detailed plan for this AI and I'll send it here. Then we can go from there.

crimson galleon
#

im down

grizzled bolt
ocean wren
#

AI is always a bit of an art as well as a science 🙂

daring urchin
#

Has anyone had any issues with AI perception seeing one player but not seeing others in multiplayer? Using 4.27

last fjord
#

<@&213101288538374145> just to be clear, these are all over this discord now, every channel

fair zealotBOT
#

:no_entry_sign: Ahmad9a9PRO#0284 was banned.

rough lotus
last fjord
#

@rough lotus thanks 🙂

light blade
#

could anyone tell me how do I set a boolean BB key when the player is in line of sight? right now I use AIPerception and thinking about using On Target Perception Updated as a way to do it. Or are there anyway to check the condition easily? I tried to search for the answer but official doc also not helping much about this. I really out of idea on what kind of keywords I should search. In case you wanna know how my BP is, there is only On Target Percetpion Updated(AIPerception). Because I have no idea what to do, sorry for bother.

misty wharf
#

Yes, just use the perception events

#

or whatever method you use to do the detection in general

light blade
misty wharf
#

Ah

#

In the event you can check what the actor that was perceived is

#

so you can for example Cast to PlayerCharacter

light blade
#

well I do want to only change the boolean on blackboard key so that the condition met

misty wharf
#

Yeah, so if the cast passes, you can get the blackboard and set the boolean value on it

light blade
#

I cannot cast to playercharacter but can cast to PlayerController, dunno if it'll works but thanks for some help

misty wharf
#

You should be able to if you try casting the sensed actor

#

you're probably casting something else if it only offers the controller as an option

#

(or your player character class is called something else)

light blade
#

well I cast from Actor

#

but if it works I think it's better to cast to playercontroller because you might have to change pawn right?

misty wharf
#

Well, the sensed actors are going to be the ones that are actually moving around and being seen

#

so they'd be your pawns or other such actors typically, and not controllers

#

you could certainly use other methods besides a cast to check it - such as checking if the actor has a certain tag. In that case you'd just need to make sure you assign the appropriate tag to the player pawn class if you do change it

light blade
#

it not works, the player controller also not work, I even casted to AI BP itself and still not work.

misty wharf
#

You're getting the blackboard from the player character

light blade
#

well this is how I understand from your explanation,so...

misty wharf
#

Yeah the basic idea is right, yes :)

#

But you have to get the correct blackboard - if you were to get a blackboard from the player, you would be setting values on that one, and not the one belonging to the AI which saw the player

light blade
#

well I need to set the bool from AI BB

misty wharf
#

This logic is in the AI controller for it I'm assuming?

light blade
#

it's in AI character BP, I don't know if it's possible to get that event on AI controller

misty wharf
#

Ah okay. To get the blackboard for the character, you can do Get AI Controller -> Get Blackboard

light blade
#

cast to AI BP first right?

misty wharf
#

You don't need to cast or anything

light blade
#

do I need AIPerception on AIController?

misty wharf
#

No

light blade
#

it's on AI character BP

#

well yeah I found first problem, the perception not works

light blade
#

Here is how I do it, This is in AIController. The perception didn't work part of it is because I didn't set "affiliation" to everything(still not know how to set to one yet). And I didn't tick "Auto Register as Source" at the AIPerceptionStimuliSource on the player character.

#

Well in conclusion I made it works as I wanted to.

hard crag
#

A question about the Observer Aborts
How can I end the task 7 and continue on task 8. Right now, the self abort will prevent from proceeding

misty wharf
#

Try adding a force success decorator

#

since abort counts as fail

light blade
hard crag
misty wharf
#

I'm not sure if it's designed to work in that fashion 🤔

#

So I'd be careful... but if it works I guess it works

alpine path
#

Does UCrowdFollowingComponent work with custom nav links?

ocean wren
#

Yes

ocean wren
#

I did some custom nav links for ladders and doorways and it worked for me

ocean wren
#

Hmm, seems like Epic have finally allowed some love to go into Unreal Engine for AI. I didn't know, but Mikko Mononen (person responsible for Recast and Detour libs) has been working on some AI tech for UE5 and its one of the things behind the Matrix thing they just released. I'm kind of sad it was the matrix and not something original, but hey, access to that tech will be fun. Mikko is a top guy in terms of he cares about usability and presentation too.

crimson galleon
#

yeah, it came up earlier today in the lounge, pfist was talking about it. suppose to allow more crowd ai features

ocean wren
#

Just glad to be finally seeing some movement in that respect and Mikko really is a great person.

#

Given they've got Mieszko and Mikko and John Abercrombie, they've got some really experienced AI guys around. Apparently Mikko's been working on this for a year.

#

Still going to be huge room for improvement though 🙂 in terms of the whole AI thing.

crimson galleon
#

AI in general hardly gets love

#

only these recent years has it been doing other things

ocean wren
#

Yeah, but hey, limited progress is still progress right?

crimson galleon
#

and game AI, definitely nothing pushed

#

that it is

#

crowd AI does sound big

magic jasper
#

Seems they've added a traffic system of some kind

crimson galleon
#

right right, its like they have some gta tech coming in

ocean wren
#

I guess we'll see soon enough

#

Looking forward to seeing the tech

#

I was just bitching at Paul, one of the Epic guys about it being the matrix (I'm not a fan of keanu reeves) and how it was just a fucking advertisement

#

But hey, the tech can't be held responsible for the business decisions

#

I just wish games companies had a bit more artistic vision I guess

crimson galleon
#

dont get me started, Kena won best indie.. sure it looks great, but its a sony + epic product, nothing indie about it

ocean wren
#

I think what set me off was the Matrix thing where they had that Uncharted style "shoot the tyres" sequence.. that stuff pisses me off

#

fucking call of duty and uncharted have a lot to answer for 🙂

#

pardon my french

magic jasper
#

It's a tech demo really, still hugely impressive though

#

Makes all the "GTA Realism Mod" videos look dated

ocean wren
#

Yeah, I was just wishing it was something original? I understand its a business decision and all.. apparently some of the team worked on the original film too. But it feels like UE is being subverted by lots of shitty advertising/crypto/nft bullshit lately, so I'm a bit sensitive.

#

Just don't like cool tech only being used for goddam advertising

magic jasper
#

With any luck we'll get some new original IP's from Epic post-UE5 launch.

ocean wren
#

This Kena is kind of Pikmin meets what? 🙂 some other game

#

Yeah, maybe. I wouldn't count on it. But maybe.

#

I'm just going to riff with it and see what comes out.

crimson galleon
ocean wren
#

Planet of Lana looks cool

ocean wren
empty fossil
#

ok, I'm here with a weird problem - I send a MoveToLocation action to my AIController, and it doesn't do anything, because apparently i get NULL here. What is this?

#

here, when building pathfinding query

#

(this is ofc Epic's code, not mine)

#

like, yes, I'm streaming in level, but that level has navigation built, wtf

alpine path
#

@empty fossilDo you want WorldComposition + static nav data?

empty fossil
#

@alpine path yeah. i would assume sestting navmesh to dynamic is a performance hit i dont need

alpine path
empty fossil
#

thanks, i will check it out!

alpine path
#

I think with UE5 dynamic setup will be the preferred, since it is object streaming

shadow sierra
#

Has anyone ever experienced this when using dynamic modifiers for obstacles?

#

A box collider with the area set to NavArea_Obstacle is spawned and the navmesh disappears. The area should all be green

#

Ah i fixed it, I must have changed something in the level and I had to build paths

zealous ginkgo
#

So I have an eqs context that stores all of my enemy characters, and I'm trying to add a filter to their movement and cover EQS systems that ignores points that are within x units of any actor with said tag. Unfortunately none of the methods I have tried have worked, and I was wondering if someone could help me out/point me in the right direction (Im new to EQS)

#

My first thought was to use the distance test (mainly by setting something up that allows me to filter out points within x units of tagged actors), but even when double checking what I think are the correct settings it doesn't seem to work

wide kraken
#

Hey all, I am wondering: if I can implement something as a function inside the AIController OR as a node for the Behavior Tree - is there some general rule of thumb on how to decide? Any general good practices there?
For example, a function that goes through an existing array of actors, and return the 'best' one. Where would this go, AIController function, or a BT node? 🤷‍♂️

crimson galleon
#

I usually try BT first since those are bite-sized tasks/services or else BP if its too dependant

#

perception for example, merits bp because of the set up

naive veldt
#

how do you make the BT to keep looping in a sequence while a bool key has some specific value?

#

also I don't understand what's the point of decorators checking if the key is set rather than their values.

crimson galleon
#

Loop task

#

Keys range from bool to vectors and such

#

A bool key can be true or false - these are both considered set

naive veldt
crimson galleon
#

Maybe its a decorator

naive veldt
crimson galleon
#

The bbc checks condition if set or not and updates on value or result change

naive veldt
#

the loop decorator only allows to define the number of iterations

#

it doesn't seems to check any key

crimson galleon
#

You can have more than on dec or if you prefer make your own dec

naive veldt
#

I don't care how many, I just don't see any of them that can do the job

#

Will youtube it a bit, this is probably the most unnatural thing I ever had to deal with.

zealous ginkgo
#

What methods can be used to stop AI from clumping up?

crimson galleon
#

RVO avoidance on the pawn cmc

#

Detour ai controller is another route

zealous ginkgo
#

I'll admit I don't know what that means. I'm still learning AI scripting

crimson galleon
#

Fixed it 😇

zealous ginkgo
#

Thanks! I'll look into both of these methods

carmine herald
#

Hello everyone.
I am facing problems in AI Move to node.
It works perfectly and my ai is able to follow my player in unreal editor, dedicated server.
But when i package the project and run from client build, the ai does not follow my player.
What can be the issue? I have been with this blocker since long. Any help would be very much appreciated.. 🙏

autumn hollow
ocean wren
#

Hey all, remember that discussion about thief and the shadows and whatnot? Well watch this presentation: https://youtu.be/Z6oZnDIgio4?t=238

GDC

In this 2018 GDC talk, Daniel Brewer and Rez Graham explain best practices for helping video game AI make decisions that will feel impactful to the player.

Join the GDC mailing list: http://www.gdconf.com/subscribe

Follow GDC on Twitter: https://twitter.com/Official_GDC

GDC talks cover a range of developmental topics including game design, ...

▶ Play video
#

Basically, Daniel suggested intersecting the light frustum with the navmesh to alter the nav properties. Which sounds like a very neat idea.

ocean wren
naive veldt
#

Any idea how can I check if the behavior tree is executing some specific type of node?
I mean, from outside the tree itself.

dark briar
#

i need a guide on how to make the enemy strafe around the player using eqs. I did a couple of tests but still it isn't working like how i want. if someone has done it before, it'll help a lot. been working on this for days now

#

the test i've configured cannot differentiate the Left and right direction so when it reaches an obstacle, it doesn't strafe the other way. it keeps on going in one particular direction instead

#

my tests

keen crow
#

what are the applications of UPawnActionsComponent in AAIController? I couldn't find anything about it. How do people use it?

silk fulcrum
#

I can't get EQS scores to be anything other than zero when using GetActorsOfType, anyone know if that is just broken or if there is something non-obvious?

#

Trying to just do simple distance scoring

hearty niche
#

how do I check what sense my character was detected by when detected by perception?

crimson galleon
crimson galleon
crimson galleon
ripe tapir
#

i have a quustion: so i have this giant worm thing and i wanna make an AI for it. heres what i want the AI to do: when its idle to stay underground and randomly jump in and out of the ground, when its alerted to rush to the player- still underground and randomly jumping out of the ground

silk fulcrum
# crimson galleon did you set the context from the default querier?

I don't remember doing that specifically. I made a new EQS query which is just this, it's set for search center to be the querier. My understanding was that ActorsOfClass in this case was the context, is that not the case? Could you point me towards setting the context if so?

crimson galleon
#

Querier would refer to this controller which is executing the BT

#

maybe you've changed this

silk fulcrum
#

Where are those fields?

crimson galleon
#

on the same node you have selected

#

or should be

silk fulcrum
#

Interesting, mine looks like this currently

crimson galleon
#

the dropdown should have your getclass

#

the pic i have is for pathgrid node, but you have it there: Search Center

silk fulcrum
#

Ah gotcha

crimson galleon
#

that should have an entry for your query context

silk fulcrum
#

Yeah in this case I wanted it to be the querier, I think, because the intention was that the AI is the querier, so it should be looking for BP_Ships around itself (which would be possible targets)

crimson galleon
#

ah, i think i understand

silk fulcrum
#

The hope was for a simple "get me all of X around the AI" and then I can filter down X via scoring to get the best one, and then the AI can engage that. Though they're all scoring zero when I put tests on. 🤔

crimson galleon
#

not sure, could be any of the tests not set right. You have tests for both filter and score right? i see 3, looks like 2 for filtering and 1 for scoring. Also, when query happens, the other ships are valid in the navmesh (they're on it/using it)?

silk fulcrum
#

Intent was just to score higher the further they are, so this is the full set of the tests at the moment

#

There is a navmesh, though I don't necessarily think my ships are on it perse, they're just spawned into the world and querying it for locations, I haven't done any manual attaching or anything, though for this test I wouldn't necessarily expect to need to

crimson galleon
#

ive never used this node, so i dont know its specifics

#

if its this much trouble, maybe a bp version using GetActorsInSphere SphereOverlapActors

silk fulcrum
#

I'm brand new to using EQS, so I assume there's just something dumb I am doing wrong

crimson galleon
#

yeah, EQS and BT are very particular

#

part is hows its being used while the other is the specific checkboxes and settings

#

the feedback of what doesn't work is not that great

cobalt palm
# crimson galleon im down

I created a post on UE Forums of the issue I described as well as a flow chart to kind of show the AI's full behavior that I would like.
Link: https://forums.unrealengine.com/t/need-some-ai-ideas/265484

misty wharf
#

heh

#

you have such similar issues in yours as my project because I'm working on a video rental store simulator :P

#

the way I'm handling queueing in mine is the register holds a queue

#

and whenever the queue updates, the npcs update their physical positions in it

#

the queue update event includes their current position in the queue, so they can use that to determine when they're the first in queue and should perform actions based on it

crimson galleon
#

@cobalt palm 👆

cobalt palm
misty wharf
#

yeah basically when the npc enters the queue, it tells the register its entering the queue, and it also starts listening to the queue's update event

#

and whenever they leave the queue they tell the register they're leaving the queue, which then triggers the events

cobalt palm
#

Oh, did you watch/read some documentation on this so I can adapt it?

misty wharf
#

nah wrote it from scratch

cobalt palm
# misty wharf nah wrote it from scratch

Ah. Hm. So the events that are triggered, is it events that the register triggers based off who is in line and it is an event in the AI's bp or is it a variable that the BT is waiting for?

misty wharf
#

yeah the register manages the queue so it triggers it based on when npc's call the LeaveQueue function on it

#

the npc's have logic in them which handles being in a queue, and for my BT I have a Queue task which handles entering it into a queue, and waits until it reaches first in queue before it finishes

cobalt palm
#

Hm. Ok so that queue task runs, then waits until it reaches first, then does another task for handling the leaving, and then you just do whatevere after that? Pretty neat. I just thought that using the move to function outside of the BT would cause problems but I guess if you are just waiting for something, it would have an issue.

misty wharf
#

Nah moving has no effect on BT stuff

#

It would only be affected if your BT is trying to move at the same time as your other logic is trying to move

cobalt palm
#

Gotcha. Well thanks for the idea, I probably will have some troubles with it tomorrow so I will probably be back. Thanks.

subtle shoal
#

Got a question for someone

#

Using a Sub Behavior tree to run some behaviors. It's using a Blackboard that derives from the parent blackboard but has extra keys... It's not running, does anyone have experience with that?

cerulean sky
#

Would a generic ue4 AI character work good with time dilation? Do I need to do anything special?

subtle shoal
#

the BT_SpawnDrones derives from the BB_Boss tree

#

Just has the one additional "shield" key

#

... If I make the tree no longer a child tree, it does continue into the sub tree, odd.

#

Anyone know how to make a sub-tree that has a different BB run? I don't want to have the root tree use an excessive amount of variables.

dark briar
celest python
ripe tapir
#

i have a quustion: so i have this giant worm thing and i wanna make an AI for it. heres what i want the AI to do: when its idle to stay underground and randomly jump in and out of the ground, when its alerted to rush to the player- still underground and randomly jumping out of the ground

ocean wren
#

That's mostly just playing animations while idle and different ones while attacking

ocean wren
#

Anyone checked out the new stuff in UE5 for the Matrix thing? Just wondering what it looks like

#

Apparently the code is in there under experimental

celest python
#

Did they release the demo as project?

#

I thought it's for gameplay only on consoles

ocean wren
#

No, but apparently the code is in there

#

They're releasing some demos next year sometime

#

But according to the stuff on the internet, the new crowd stuff supports like 100,000 agents etc. Which seems worth a look at

celest python
#

Yeah, thats what got my interested first

ocean wren
#

Someone on twitter mentioned it was in there already under experimental

#

so.. I guess its in the UE5 codebase?

celest python
#

Yeah, it's the MassGameplay framework I've sent you earlier

#

ECS system with visualization thing, you have your agents in the ECS and bind them a visual mesh in the world

ocean wren
#

is there any info on it?

celest python
#

That's what they're doing from what I can see from Digital Foundry's video

ocean wren
#

Digital Foundry's video?

celest python
ocean wren
#

Ah, hadn't watched that, thanks

ocean wren
#

for a creature like that, you're basically going to have to animate it mostly

#

not really an AI thing

ripe tapir
#

can i animate it in unreal

#

or blender is better

ocean wren
#

You could, but it would be a bad idea

ripe tapir
#

ah ok

#

so blender

ocean wren
#

Yeah, blender, max, maya etc.

#

What you COULD do in unreal, is add a control rig to it and add some secondary animations procedurally

ripe tapir
#

ok

elfin sonnet
#

Hey guys, I am getting this weird navmesh thing. No matter what parameters I choose, some parts of the navmesh are floating above the terrain. And my AI agents somehow get stuck "under" it

#

Any ideas why? I have just a basic AI random move behaviour, and the agents are able to find a path on the navmesh and move to it, no problem. But once they find a path to this spot, they get stuck and can't move out of it. But they are still choosing random points on the navmesh, just can't find a path to them it seems

#

I guess it must be because they are somehow stuck "under" the navmesh?

delicate gazelle
#

Hey there, does anybody know a way to make an AI sight on navmesh instead of just something in front? Like your player requires to be on the same navmesh path before the AI can see you? I'm rather still new to the AI functions, I've only studied it a little to know about blackboard and trees though how to add it into my favor is something I don't know about.

delicate gazelle
#

I repeat, does anybody know a way to make an AI see player by through navmesh path? Try to think of it this way though I know this is not very realistic but it's how it worked, if a table is in front of the AI and the player is behind it the AI won't see you even though the table is not high enough to not block sight if you can get me.

crimson galleon
delicate gazelle
# crimson galleon Literally what colliders do for ai perception

I'm not quite sure what you mean by that. I haven't had a lot of experience with it. I'm at the moment trying to make a structure of the blackboard and behavior tree of the AI patrol. If you've played Persona 5, you should understand how to AI patrols in that game function. I've noticed highly that they patrol on the path of the navmesh so if anything is in the way of the navmesh, they won't notice you unless you are on the path open. If you'd like a full explanation of the AI's from Persona 5, I'll have to give a lot of screenshots so I'd like to put that all in a personal chat. I know this is a lot of explanation so I'm just asking if there's a way to connect the navmesh bounds volume to the AI patrol in a way though I'm actually trying to see in that is possible if I just cut the navmeshes with low objects so if you know this won't work then is there a way to do it?

crimson galleon
# delicate gazelle I'm not quite sure what you mean by that. I haven't had a lot of experience with...

Ai perception is implemented in BP (i guess cpp too?) and if there is a clear line of sight to its target, it will register so you can perform AI reactions (run at player, call for help - whatever based on BT state).
Blocking volumes can do the same as in the picture, but they are invisible in appearance. With your table example, the collider for the table can be created from sm editor, set to block all, and will perform the same. SM can also be marked as a dynamic obstacle which can move and if navmesh is dynamic it will update on movement.
In BP you can specify the Navigation Area Class for a similar reason.

Patrolling is usually handled by defining waypoints where the AI can then use the navmesh to travel with. Not sure how your are "detecting" the player and it sounds unreliable.

crimson galleon
# elfin sonnet Any ideas why? I have just a basic AI random move behaviour, and the agents are ...

the navmesh generated looks low res, you could play with the Tile Size UU and Cell Size in Project Settings > Navigation Mesh to have it more precise, if that matters (i believe it will be a slight more expensive).

Alternatively, you can adjust the Agent's Default Query Extent, specifically Z, so that it projects itself onto the navmesh even if it is far away from it (specifically Z). Thats in Project Settings > Navigation System > Agents. The way I have my AI setup, they platform, so this solved it for me, I set the z to 2000 (Should be plenty right?)

delicate gazelle
crimson galleon
delicate gazelle
crimson galleon
#

not surprising how specific game preferences are among other, especially game devs

#

the more games you can reference the better though

ocean wren
#

There's a raycast function on the navmesh that you could use to detect things along a line, if that helps

#

Or just tell the objects to block the navmesh and your agents will path around them

delicate gazelle
ocean wren
#

Can't remember which class exactly. Sorry. Likely something like NavSystem. I just came across it when I was doing some cover generation.

#

Search for raycast navigation unreal engine on google? might hit something

#

Although maybe not. Not sure it was available to blueprint

delicate gazelle
crimson galleon
#

yeah, thats what it's called

ocean wren
#

Never played it.. if you can find a quick video clip of what you want we might be able to help a bit

delicate gazelle
#

Oh...OK. Thanks!

crimson galleon
#

never used it either, also not sure how it will help you

delicate gazelle
ocean wren
#

it does a 2D only raycast along the navmesh only.. basically its a horizontal ray to find the edges of the navmesh etc.

crimson galleon
delicate gazelle
ocean wren
#

Well, I am pretty sure you can detect stuff like navmodifiers with it, so you could have a navmodifier on objects you want to look out for and use the raycast to detect those modifiers

#

Would have to check the source code again though

crimson galleon
#

i guess thats cheaper than getting ~~nav ~~path cost?

ocean wren
#

Path cost is just the cost of enter/exit locations along the path for each navpoly crossed by the path

#

don't really give you anything for avoidance or knowing something is in the way

crimson galleon
ocean wren
#

But that's probably where I'd start.. read the code from the raycast and understand what its doing etc.

#

doing in in navmesh is good because navmesh is really low poly

crimson galleon
#

i pretty much EQS exclusively now, so i dont recall how these work any more

ocean wren
#

yeah, EQS would work too

vale adder
#

Hey there, I have a problem with Unreal Engine's behaviour trees, so yesterday I have been following Unreal Engine's official introduction on behaviour trees, making that stealth AI that roamed around and chased the player if it saw it, or investigated a sound, the AI worked mostly, it could see the player and chase it, but the sound thing didn't work for some reason and since it was late I just saved, closed and went to sleep, when I opened up the engine today I was greeted by the AI perception not working at all: The AI could not see the player anymore, or if it can see the player, it did not chase it, I have found a guy who had the exact problem I have but the fix that worked for him didn't work for me, what can I do to fix this?

#

Here's a screenshot of the behaviour tree

#

And the screenshot from the AI controller

#

NOTE: On Target Perception Updated is never fired for some reason, so the problem must be there, but I have no idea what causes it

crimson galleon
# vale adder And the screenshot from the AI controller

have you tried a print string directly after the event, ignoring all other logic? nothing fires? did you double check that the senses config are still there, that affiliations are checked? And that the player has not lost their settup for perception either?

vale adder
#

I'll try making a print string now, as for the other questions, everything should be exactly how it was yesterday, but I'll double check

crimson galleon
#

should be... yes, please check again

vale adder
#

So... The player character AI Perception Stimuli Source is set to be source for sight, as it should be, but Auto Register As Source is off, I'll try turning it on

#

Oh it was that

#

I feel dumb now... Thanks I guess

crimson galleon
#

gunna blame Ue5 unstable

vale adder
#

Yeah, probably, I likely have to expect something similar for the hearing function that does not work, but that probably was an error of mine since in the tutorial the sound was triggered by the rock actor hitting a surface, while I triggered it when shooting with the gun

#

Thanks

silk fulcrum
#

Is there a good rule of them when something should be a service versus a task?

crimson galleon
#

Services run on a modified tick time

silk fulcrum
#

So I want to branch based off my AI being dead or not, is the way to do that with a service that constantly updates its health state to the BB, and then do it via a blackboard based condition? or continuous loop?

#

Not quite sure the right way to combine the various BT bits

#

Something like this?

sullen escarp
crimson galleon
# silk fulcrum So I want to branch based off my AI being dead or not, is the way to do that wit...

I dont think its necessary to have a constant check of whether it is alive or not by checking health, rather, it would be told that it is dead when health reaches 0. So instead of checking something over and over, it waits for death as an event.
So on your selector, instead of the service, it would be a bb dec that could go one of two ways: check a bool result (isDead) or check the boat health (float comparison). So if you dont have an isDead bool on your ship bp, go with the latter.

silk fulcrum
#

I'd love to know how to make it more event driven, it feels heavily based around polling right now

#

This works, but I don't know if that's the best paradigm, not sure how to have the blackboard accessible ship state update based on an event rather than a poll via service

crimson galleon
#

I'm guessing that in your boat bp, you have health right?

silk fulcrum
#

Yeah

crimson galleon
#

and is there ~~anything ~~ any logic in the bp when health reaches 0?

silk fulcrum
#

Yeah, I can have an event be fired in the BP when that happens, is the idea to set the BB value then as well?

crimson galleon
#

im first asking what exists

silk fulcrum
#

Yup, the ship has a health state, when its health reaches 0 it changes its state from alive to dead

#

And an event is broadcasted within the ship bp when that happens (whenever state changes)

#

My service currently just checks that on a 0.5s loop

crimson galleon
#

hang on, before we start considering the BT, im just seeing whats in the bp

silk fulcrum
#

Yeah, all the health state stuff is on the ship bp

crimson galleon
#

and on AnyDamage is what would determine it to be dead since you would do the damage calc to health right?

silk fulcrum
#

Yeah, there's a damage function which checks if it goes below 0 and changes its state, yup

crimson galleon
#

okay

#

well when it changes to 0, you could have a SetBlackboardKeyAsBool if you want

#

your BT can update when it happens that way, so using a bb decorator would know this

#

as i mentioned above, an alternative is to simply have BT watch health

silk fulcrum
#

Hmm, I wonder if there's a middle options now that I think about your suggestion

#

So I like what you're saying because its event based as opposed to polling, what I'm nervous about organizationally is having things external to the BT set BB values, as then it's sorta arcane knowledge to know where in the project they're potentially being influenced by

#

Would it be possible to use a service, but instead of having the service poll in a tick, its activate binds to the ship's health state changed event, and updates the BB value there via the state change?

crimson galleon
#

yes, less is better, so im asking what exists, as that determines the direction

#

you can use a bb decorator to "listen" to health

#

it would be better and work how you are thinking the service would work

silk fulcrum
#

I'd need to be manually setting the BB value from the ship though in that situation, right?

crimson galleon
#

bb decorators can work with bool or values

#

no i dont think so

#

your BT would need to know of health though

silk fulcrum
#

Hmm, if not from the ship, when does the BB value get changed in this example?

crimson galleon
#

we might be hearing different things... when i say bb decorator, im talking about the blue box that can be added

#

not the bb key

silk fulcrum
#

Yeah, one of these right?

crimson galleon
#

alright cool, just making sure, we are on the same page

silk fulcrum
#

👍

crimson galleon
#

so the bb decorator would watch a bb key (health) and in its settings, it can compare if the value is "greater than" or whatever

silk fulcrum
#

Yeah that part makes sense, question in this case I have is when does the BB health value get updated, since it's not actually the ship's health right, it's an intermediary equivalent value I need to keep in sync somehow?

crimson galleon
#

i think so, but maybe not, though this is why a bb bool key seems easier

#

no yeah, you'd have to have a key

#

but you can pipe in the ship health to be setting it

#

and again, a bool key would do the same, which makes more sense given the boolean nature of life (or death)

silk fulcrum
#

Yeah, that would work I think, but that set BB value would come from the ship in this case, but I think maybe the event driven way inside a service would work equivalently and be the best of both worlds

#

Lemme test real quick

crimson galleon
#

i think a way to avoid having the key (which is really not that bad) would be making a custom decorator - though its more about achieving preference

silk fulcrum
#

Yeah the event from a service works, and keeps it all internal to the BT, nice!

#

This is my service now, no polling necessary

crimson galleon
silk fulcrum
#

Yeah this is just nice since it avoids the ship having to pipe in its health

#

And/or something in the BT doing that on a tick

crimson galleon
silk fulcrum
#

Not now, my previous version was, the service there UpdateShipState in the above screenshot was previously setting the BB value for state/health in its tick, so that the BB decorators would be checking against the up to date value

crimson galleon
#

well keep testing it, make sure it handles respawning multiple times and whatnot

silk fulcrum
#

Thanks for all the help! ❤️

crimson galleon
#

sure thing

digital steeple
digital steeple
#

I think I understood it now.

elfin sonnet
#

Hey guys, I there a way to draw path on the navmesh? Like a draw debug path in Unity.

#

I have a basic behaviour tree with MoveTo point, but I can't figure out how to enable the path drawing

misty wharf
#

Visual Logger can show some of that info iirc

elfin sonnet
#

yeah I don't have that in UE5 it seems

#

can't turn it on via "VisLog" command either

elfin sonnet
#

got it, it was in Tools -> Debug 😅

elfin sonnet
#

thanks dude

crimson galleon
#

50 is 50 uu so yeah i think thats cm

shadow python
#

does anyone know why would ISM/HISM instances not affect navmesh? pawns simply keep trying walk over it and getting blocked.
it is not carved out like static meshes in P/navmesh view mode

ocean wren
#

jesus this is a mess.. how can you possibly make remote control so bloody weird 🙂

wintry flint
#

Was the tutorial for behavior trees rewritten at some point?

I last tried looking at anything to do with AI in 2018 and the impression I had back then was that the documentation was a very obtuse step-by-step instruction manual.

Written for people who already had a background in AI that just needed to get up to speed with UE4 quirks.

#

It seems a lot more comprehensible now.

Or did nothing change and I just simply got gud?

cobalt palm
#

Is there a way to have a in infinite wait node until a value is true?

#

I tried adding a while loop that waits till a variable is try to do a finish execute but I keep getting an infinite loop error for obvious reasons.

crimson galleon
crimson galleon
cobalt palm
crimson galleon
#

Its a hint

cobalt palm
#

The only thing I see is a wait delay

crimson galleon
#

Waiting is a state

cobalt palm
#

correct.

crimson galleon
#

you want the AI to be waiting until a condition changes

#

great ✌️

hoary peak
#

Acting like the annoying teacher that just wont say the correct answer

cobalt palm
#

I am trying to get it, it just isnt getting to my head. 😂

hoary peak
#

Want a hint?

cobalt palm
hoary peak
#

There's a node built in for it

cobalt palm
#

Are you referring to a decorator?

hoary peak
#

Task

crimson galleon
cobalt palm
#

I understand there is a wait task.

crimson galleon
#

alright, well, since BT are conditioned based, you need a state (such as buying an item, moving to register) that is literally waiting and enters this state if certain conditions are met or not met, depending on your approach

hoary peak
#

So you run a conditional loop while what you are waiting for is false

crimson galleon
#

yall need to read up on how finite state machines operate, it's not this intricate

hoary peak
#

Depends on the setup I guess, I have AI parts where I basically wait with a conditional loop

cobalt palm
#

Ok, so if I have the conditional loop set to "is not set", have it read a key, once the key is set to true, will it break from the loop?

hoary peak
#

Yes

crimson galleon
#

you can have this from a bb decorator, they literally update on a value change

cobalt palm
#

Ok. Thanks for the help, I will continue this tomorrow and see how this goes.

tired lagoon
#

Hello. I'm trying to get the behavior tree asset from a behavior tree component in c++, but it's protected. And there's no getter for it either. Can anyone help?

misty wharf
#

GetCurrentTree() seems to be public? Have you tried using that?

#

GetRootTree() as well

tired lagoon
misty wharf
#

So what's the problem with those? Do they not return the tree?

tired lagoon
#

Not at all. Mind you I also made sure to assign to the behavior tree asset to the behavior tree component, and start the tree too.

#

I swear I do everything and ue4 does this too me lol

misty wharf
#

How did you verify it's not returning it?

tired lagoon
#

with a UE_Log and prints out the returned type. Ima keep trying stuff and see.

misty wharf
#

so it printed out nullptr?

tired lagoon
#

The type

#

Not null

misty wharf
#

Well then it seems like it did return the BT

tired lagoon
#

You're right. But for some reason when I run the game, the behavior tree doesn't show signs of running(that yellow surge of energy as I call it)

misty wharf
#

By the yellow surge of energy I assume you're referring to the way it gets displayed in the BT editor when it runs?

tired lagoon
#

Yeah

misty wharf
#

Check in the dropdown in the BT editor's toolbar that you have an active pawn with the BT selected

#

Sometimes it won't autoselect anything

tired lagoon
#

Good idea I'll try that now.thanks

tired lagoon
misty wharf
#

Nice :)

ocean wren
#

Anyone mind answering a really dumb question that came up today and for the life of me I can't remember?

#

I had to get the name of an object in blueprint

#

I did getowner->get name and it returned empty string?

#

Just trying to print string the actor name

#

I guess the owner could be null?

misty wharf
#

that seems like it should work, but are you sure it has an owner? I think not all BP's have one

ocean wren
#

possibly not.. but whats the default way of getting an actor's name in BP? man its so long since I did BP stuff its embarassing 🙂

#

it feels like its the most trivial question, but it stumped me while I was streaming 🙂

misty wharf
#

just Get Name

#

you don't need to Get Owner it because that'll give you a different actor if it has an owner

ocean wren
#

weird.. so you can pipe self into get display name.. sheeit 🙂

#

Why doesn't it default to self? goddam it

#

Seems I'm out of practice BP wise

#

Thanks, that clears that up 🙂

misty wharf
#

it's just the same as calling this->GetName()

ocean wren
#

yeah, but it doesn't use self as a default param

misty wharf
#

Oh does it not? That might mean the function is not on the actor but rather in a library

#

Or it's a static function

ocean wren
#

Yeah, it requires an actor ref passed in

#

that's what threw me 🙂

#

that it was missing self 🙂

misty wharf
#

Ah

ocean wren
#

turns out just getting self and passing it works

misty wharf
#

Yeah it might be a static func, I know there's at least AActor::GetDebugName which is static

#

but not sure which one the BP Get Name node calls

ocean wren
#

Yeah, there's a few get... type name functions

#

ah well, I'll clear that issue up in the next stream 🙂

#

2 goddam hours and all we managed to do, was get twitch chat sentiment piped into Unreal Engine via python and the new web remote control thingy and get some basic AI director hooked up with the sentiment values

#

next stream, we'll have to make them do something more fun 🙂

#

That web remote control is both cool and idiotic at the same time 🙂

misty wharf
#

:D

#

I would probably have tried to hack all of that directly into UE

#

Your approach sounds like it probably requires significantly less work lol

ocean wren
#

Well, I could have used the vaRest plugin and it'd have been a lot easier 🙂 but still

#

the web remote requires you to interrogate the API for usable named objects. using json packets for every request.. its just nuts for what should be a route->function or parameter routing

#

which is what vaRest does

misty wharf
#

It would be an interesting experiment to just build a web api into UE where you can just directly poke at things

#

...I don't quite know what that would be useful for though lol

cobalt palm
misty wharf
#

it's just an array where the customer actors are placed

#

the position they need to stand in is calculated based on the array index and desired queue spacing

cobalt palm
#

This is the part of the BT that deals with this. The ai gets to the spot and called the Enter Queue event. It then does a waiting loop until the value is set to true to where it then does the purchase task.

#

Its saying accessed none with the get blackboard function.

misty wharf
#

the AI Controller has the blackboard I think

#

so you need to do a Get AI Controller first before you can do Get Blackboard

cobalt palm
#

That seems to have somewhat worked. They are not moving up in line though.

misty wharf
#

Well at least the BP you posted doesn't seem to have any logic relating to moving in line except when they're leaving the queue

cobalt palm
#

My hope with this was so that when an AI entered, it would set the AI that is first in line to purchase so that after they purchase they call the leave queue event which would then move each customer in line.

ocean wren
misty wharf
#

ah

misty wharf
#

well when the actor goes into the queue it needs to move into the appropriate position

#

and whenever the queue updates (eg. another actor leaves) they all need to move as their positions would now be one further ahead

cobalt palm
misty wharf
#

okay so if that's how it should work then hard to say.. you need to debug it to find out why they're not moving

ocean wren
#

DEBUG

#

that shalt be the mantra

misty wharf
#

Do Engineering Beyond Uuga Guuga

crimson galleon
#

Does Every Bit Underperform Goodly?

ocean wren
#

hmm, nope

crimson galleon
#

then it has been debugged

cobalt palm
# misty wharf Do Engineering Beyond Uuga Guuga

For the register bp where is manages the queue and tells them to move when they need to, is it an event set on a timer to check every like half second? I cant seem to get this to work in my head with only having and enter queue and leave queue events.

misty wharf
#

No, it just broadcasts an event when the queue updates

#

since the manager knows exactly when the queue needs updating (eg. when an actor is added or leaves the queue)

cobalt palm
#

Ok, so I most likely need to recode it all as I am still having accessed none errors for getting the blackboard but it may actually be due to be getting the first index of the array in the Leave Queue event which would cause problems when the last ai leaves as the array is now empty.

pallid mica
#

Is there a straight forward way to put an AI into a State while they are performing a part of a Tree? I have a part that is made for Attacking. Some bigger Sequence that performs some actions. I had a PreAttack and a PostAttack which started and ended the State part, but if anything kills that part of the Tree (e.g. the AI gets hit, which will put them into the Interrupted State, which will, a lot further up the tree, abort stuff), it won't call the PostAttack and the AI won't leave the State

#

I tried a SimpleParallel, with the MainTask being something that manages the State, but Tasks only have Execute->Finish and Abort->FinishAbort, so there is no "everything completed and the sub tree is exited".

#

I also tried a Decorator that returns true and uses Activate and Deactivate, but then I noticed that the tree is never entered cause some other Decorators up the chain instantly fail their condition if the State Decorator changes something they rely on, so this also won't work.

#

Not sure if a Service would help.

#

Also, fwiw, I have huge trouble getting my head around Behavior Trees. They look so nice at the start but feel damn limiting by enforcing too many made up rules

celest python
celest python
crimson galleon
celest python
pallid mica
celest python
pallid mica
# crimson galleon i thought a parallel node would help me for what sounds similar. I have an AI th...

It's more like that I want to combine it with a GA based StateMachine. AI has GameplayAbilities that can perform specific things when they get Activated. They are, based on UE4, activated when a Tag is added and deactivated when the Tag is removed.

Now there are two ways I can look at this:

  1. Tree Enters and Exists a Part of it that Adds and Removes the State.
  2. Tree only Enters a Part (and exists it again) if the State is available, and I add and remove the State from somewhere else.

But while 2 sounds good, I would still need to know when the Tree is done with that part to remove the State again, so it basically becomes option 1 again

#

I will first try to see if I can figure out why a Decorator doesn't work for me

#

Because it calls Activate and Deactivate exactly in the scenarios that I want, so this would be perfect in theory

#

Suddenly the Decorator works...

#

It really doesn't help that looking at a BT while it's active tells you the truth only 50% of the time

celest python
#

You can use Visual Logger

#

BT execution exposed to it on the source

patent hornet
#

@pallid mica your PreAttack and PostAttack are parts of the BT?

pallid mica
#

They were originally, they aren't anymore

#

PreAttack was doing things like: Play Taunt

patent hornet
#

i'd keep it clean, have a TransitionToState that calls Post on OldState and Pre on NewState

pallid mica
#

If I would have the time, I would yeet that BT out of the window and code it myself

patent hornet
#

that way you should be able to abort part of the BT related to state just by setting the state BB key

pallid mica
#

Yeah it kinda works now. So I won't doctor around on it much more. I need to change the EncounterManager now to have a more organized attack order. Need to finish most of it this week. BT will have to work in the way it does now.

#

But I of course appreciate everyones answers and time

#

Co-workers in the office can tell you stories of me flipping tables over the BT.
I will probably come up with a custom solution to the BT in the future. Plugin 4tw

patent hornet
#

engine annoys me more then any weird thing other people do 😄

pallid mica
#

The BT just seems to enforce rules upon me that I don't see necessary.
It always feels like you need to know the exact combination of 5 nodes to accomplish something that in pure code would be 2 lines

#

Or use parts of it like Decorators to convey a state. It just doesn't feel right

patent hornet
#

we use BTs to run ingame mission logic

#

for that, they work great

#

managed to train a pair of junior designers into creating their own missions in just a couple of weeks, none of which had any significant programming or unreal experience

pallid mica
#

Don't get me wrong. The BT probably has its uses and people who use them for AI for the past years know how they need to do stuff. But I often waste time on stuff where I know that the logic is correct, but the BT doesn't support it without 4 additional nodes

patent hornet
#

(plenty of c++ running backend for that, but they don't need to concern themselves with that)

pallid mica
#

Yeah but it's not like one couldn't have made that mission logic stuff with a more generic state machine or?

#

There are plenty of StateMachines with visual editors on the market

#

Or even writing it yourself fwiw, cause making a node editor like the BT is not actually that hard. There are open source examples for this

#

Of course it takes time so using the BT if it works is totally fine

patent hornet
#

also prefer not to confuse those designers that can handle blueprints with another editor

pallid mica
#

No I mean Editor for Asset Types, in UE

#

Not additional software

patent hornet
#

nod i designed the mission system to work with unreal BTs out of the box

#

and didn't need to go out of my way to do it

#

so, they were perfectly fine

#

got c++ BlueprintAsyncActionBase derived classes that handle tasks like DestroyActor, ReachLocation, DeliverItem, FindItem, DeployItem, InteractWithActor... etc

#

then blueprint tasks wrapping those

worthy python
#

Hi! I'm sorry for a late reply. Can you please say What is right method to create "cover triggers" for AI?

#

How are the problems you wrote about usually resolved?

celest python
#

It's been a huge 3 weeks lol 😂

#

I didn't see Cranz around for at least one or two weeks

worthy python
#

ehh, really? ☹️ Maybe Does anyone know what he meant by that message? How triggers can help me detect a multiple enemies?

celest python
#

I don't even remember those days, it was the first steps of the current layout of the project and a lot of things changed

#

I still move my pawns from AIController without using BT though, I have a subsystem that manages path goals and uses a AITask to move them

worthy python
#

Enemies won't overlap this trigger. Trigger is a place used by AI for a covering.

#

He meant that enemies position can disable trigger. For example

#

all sides of trigger are visible for enemies. AI can't use it for covering

celest python
#

Make an actor, create N amount of sphere components, place them to the cover points, when AI occupies that cover position set a boolean for that sphere component and let AI only occupy the non-occupied points

#

Or just use the Glass' cover system 🤷‍♂️

worthy python
#

ty. it's a simple base. I'm doing same.

worthy python
celest python
#

.

keen crow
#

Why could it happen that my "Run behavior dynamic" doesn't actually run the BT I specified in AI controller`s begin play for a specific gameplay tag? In AI debug console I can see that correct BT is supposed to be running but that text is blinking with every frame as if it starts and stops immediately. Also it is run in sequence and it looks like the "Run dynamic behavior" task is failing because next task in sequence is never run

misty wharf
#

Incompatible blackboard probably

#

Or the subtree fails right away

keen crow
misty wharf
#

I don't remember for sure. It might have to be the same BB

keen crow
#

hmmmm

misty wharf
#

Easy enough to try and check if that's the issue at least

keen crow
#

damn

#

it is the BB. they have to be the same

#

But was is the purpose of dynamic BTs then if I still have to keep all the possible conditions in the main and common BB? Unless... among with common BB variables I could only store a state object for each dynamic behavior and then just read it in dynamic BT`s tasks and decorators...

misty wharf
#

Yeah the BB inheritance thing seems a bit weird :P

#

I have a lot of custom tasks and decorators which just read stuff directly off my pawns and such because storing all of it in the BB would just be a bazillion variables and so much glue code

keen crow
#

so instead you have bazillion of decorators that check different values?

misty wharf
#

lol pretty much

keen crow
#

noice

#

Ok another theoretical question. Does anyone know state of this thing here? Is it some legacy thing that is going to be removed in UE5 completely or is there a chance there will be alternative to BTs sooner or later?

cunning fulcrum
#

Im doing some implementation of HTN plugin at moment, as far I know is a early version very bare-bones and I didn't saw any updates in the git, its kinda working for me so far, Im using as guide to prototype a HTNP for my needs

#

some tweet from 2020

cobalt palm
#

Hello, I am having a small issue where if call the Move To Location functions on an AI that is already moving to another location, it will set priority to the new Move To functions but once it arrives, it then moves to the first location it was told to go to.

Is there a way so that if the AI is moving to a location and is told to go somewhere else while doing so, it updates the current Move To location to the new one?

crimson galleon
#

This is a finicky are but you can try abort move or stop movement maybe. Sort of depends on how the move to calls happen

cobalt palm
crimson galleon
#

@zealous ginkgo thinking more on it, a selector based on failure to find a loc via eqs might allow for a failsafe

zealous ginkgo
#

I was thinking of that at first, but there is no blackboard condition fouling on failure

#

initially I was going to implement the failsafe within the move to cover function, but the EQS locks everything up before it gets to that point

crimson galleon
zealous ginkgo
#

I just realized I just need to clear movement location beforehand and then just check if set afterwards

#

That works, I just forgot to clear target location first so it was still technically set to something and therefore true

crimson galleon
#

oh

zealous ginkgo
#

its always the small things that slip under the cracks

#

thank you!

#

Actually wait lemme double check real quick

#

debugging is a little lengthy

#

unfortunately it doesn't seem to work. Even with the setup above it seems to get caught since if the eqs fouls it does not overwrite targetlocation with a null, it just tries again

#

Ive also tried forcing a success to then foul on the next task, but that doesnt seem to work either

crimson galleon
#

hmm

#

can you think of any dec to put on the eqs task to ensure it runs in a limited way?