#gameplay-ai

1 messages · Page 29 of 1

stoic cove
#

I've honestly already got the navigation and movement of my tanks working already with the node I posted earlier. There's only one problem left I'm trying to tackle which is agent radius sizes. I'm breaking my head trying to figure out how the agent system works but can't get it working and info / docs are very limited too sadly.

uneven cloud
#

Agent settings are in the movement component. By default it takes the capsule size for the character movement component, but you can set that up however you want.

stoic cove
#

I wonder why there is no movement component that simple uses the local offset system to move a physics based pawn around the nav mesh. Why is there only character movement which is purely designed for biped / humanoids and wheeled vehicles that use advanced suspension and friction system which are complete overkill for most arcady usecases. Why is there nothing simple in between?

#

The navigation system and AI in general is awesome in Unreal Like, I've really succeeded easily in making very good working AI characters. But missing things like this sadly make it only good in those forementioned areas / situations. When you're making a game that has more than just characters you're out of luck. 😦

uneven cloud
#

Once you set up the agent sizes for each pawn, then you set the supported agents in the project settings. The agent settings in the project settings has to be 1uu larger than your pawns. This allows the nav mesh to be created to fit your pawns.

You can have multiple supported agents, but this does create multiple nav meshes.

stoic cove
#

I only need two actually

#

1 for my character and one for my vehicles

#

But yeah because I'm not using any movement component on my vehicle I guess it's not possible

uneven cloud
stoic cove
#

Ok, that sounds interesting, let me check that out then. My bad

#

What is this component called exactly? Can't find any nav agent movement component

#

You mean floating pawn? 🤔

#

And well, wheeled vehicles can be added to that list I guess even though they're not mentioned here.

uneven cloud
stoic cove
#

Don't think that's available in blueprint

#

Or.. it's the floating pawn movment component which would make sense if I look at what this component you link to does

#

it doesn't take physics and gravity into account afaik, it just applies a movement / direction vector

#

Which would make the pawn float

#

The tank in my game is based on a tutorial by Unreal btw

#

Which is ironic I guess

plush creek
#

what is the point of UAITask? when should you use it combined with UBTTaskNode?

dense owl
stoic cove
#

Yes, but it's children are only limited to floating pawn, character (which is only available in characters) and wheeled vehicle. There are no other children components of that class exposed to BP.

dense owl
#

So just use a character?

stoic cove
#

Well, no because that has biped movement and is forced to use the movement system it comes with. I want to use addlocal offset physics based movement that works well with a tank. Character movement does not work for what I want my tank to do.

#

Or yeah I dunno. I guess maybe I could try using a character movement component and try to circumvent all of it's unneeded systems. But seems like an insane amount of work to alter it so much and have a whole bunch of stuff there that's not being used and can potentially mess with the way I want my tank pawn to move.

#

Seems very convoluted tbh.

dense owl
#

You don’t have to use the skeletal mesh

stoic cove
#

But as a last resort it could theoritically work I guess. Would have to completely redo all of my tanks physics and stuff which would be a lot of work as well. Kinda sad that I cann't use my own system when it works so well for none-AI movement 😦

dense owl
#

Or even if you do, it’s not necessarily bipedal

stoic cove
#

Yeah sorry i don't mean biped. I mean like it's based on a character that can walk, swim, jump,... when a tank is clearly not a character but a vehicle.

#

But yeah, perhaps I can only try to use the walk system and use it as drive

#

Hmmm you gave me some ideas

#

Might try this

dense owl
#

You can always have your tank float on top of the nav mesh with gravity on

#

Is what my units do

lyric flint
uneven cloud
plush creek
uneven cloud
plush creek
crystal sequoia
#

if I put a task that has input arguments like this in a subtree so that i can reuse that tree across a few types of mobs, how can i pass parameter values into the subtree. eg. say i want mob 1 and mob 2 to both use a subtree that calls this task, how can i have a different Combo_Probability for mob1 and mob2

inner zephyr
#

Are you me? That god damn crash on Abort 😭
Edit: Tried to just copy the plugin from the main-ue5 to 5.2.1 but it looks like they made quite a few other changes

thorn girder
#

(Pings off don’t worry) I think this should be unpinned as the videos were privated

dawn anchor
#

Hello my friends. I have an unreal event triggering issue within my project I was hoping someone could help me with. Today I have followed an online tutorial for setting up a detection system within my game. Before this my AI enemies would see the player as soon as the player comes into the line of sight of the AI. Now when the enemies see the player it fills up a user interface bar and only once it is full does this trigger the attacking state, which is turn allows for the Chase branch of my behaviour tree (see figure 1).

The tutorial I followed used the 3rd person character BP and an enemy AI BP. For my system im using the AI controller rather than a single enemy BP, so that the system will be universal across all enemies within my game. The tutorial also used AI Pawn sensing where as I have utilised my AI perception system for results catered to my own game (see figure 2).

The system uses Blueprint interfaces to communicate between blueprints (see figure 3).

The idea is when the progress bar becomes full it turns red and this sets a boolean “should attack” to be true”. Then when the progress bar fades back to 0 this sets the Boolean to be false. And the AI returns to a roaming state (see figure 4).

These events are in the AI controller blueprint, however the event is being called withing the 3rd person character BP. After adding break points within the blueprint ive discovered that the event call is being triggered from the 3rd person character BP (see figure 5). this message isn’t being received within the AI controller. Im unsure as to why. Any ideas???

#

im wanting to later improve this system by adding other variables that effect the speed that of timeline controling the detection progress bar. The player character has an invisibility effect which i want to increase the timeline time from 3 seconds to 6 seconds for example. now i could just use the "is invisible" boolean to trigger a branch node. each branch leading to a new timeline, however this wouldnt work if the player turning invisible half mid detection. therefor some kind of timeline multiplier would be better. another variable i want to add is enemy distance from the player character. if the player is within a meter of the enemy the time line fills up in1 second compared to 10 meters away taking 3 seconds for example. again a timeline multiplier of some kind. anyone come across the node, or combination of noes im looking for? thanks evenyone

neat hatch
#

is there a way to set a bool to true or false everytime the ai perception has sensed the actor?

#

the Succesfully Sensed bool keeps going True and False every frame

dawn anchor
neat hatch
#

Is that what its meant for?

#

Never taken it

#

I gotta try it out later on

stoic cove
#

That might just be the perfect solution for my usecase.

dawn anchor
#

In your sight perception settings on the AI component there's a bit where you set the max distance. Theirs an age setting also which dictates Huw long the stimulus is registered. If 0.0 it's has no time limit

neat hatch
#

age comes out as 0

#

even if it senses the actor

#

oh, right

#

the setting

#

by default it seems to be set to 0

#

tho setting it to 1 does not give a different result

neat hatch
#

I think I now the real reason I'm unable to properly use the Succesfully Sensed boolean from the stimulus

#

the socket which I parented the ai perception has wrong rotation

#

meaning I gotta add a socket into the target bone and rebuild the c++ asset again
and I'm on a HDD -_-

fading moat
#

i'm trying to get a zombie character to jump when reaching a NavLinkProxy, yet they do not jump at all yet are attracted to the proxy, none of the code is going through since print strings won't print, what did i do wrong?

#

inside the character

#

inside the navlink

#

the navlink

neat hatch
fading moat
#

wdym?

neat hatch
#

Simply get a collider and use that to send a signal to the ai that will tell them to jump

fading moat
#

how is what i did not doing the exact same thing?

#

"event receive smart link reached" isn't even triggering despite the AI clearly reaching it

neat hatch
#

I made myself one using a collider actor and a line trace so the ai will jump over a object only if its facing it

fading moat
#

will you please elaborate

fading moat
#

....

uneven cloud
fading moat
#

i followed a tutorial

#

i thought it was set up to do the opposite

#

so how do i set up the smart link then

uneven cloud
#

There are 2 different types of links. Point links and smart links. They are variables in the nav link proxy.

Point links are really only useful for C++. They don't get an event and are used in the path following component to trigger behavior.

Smart Links give events to trigger behavior that is available in BP.

fading moat
#

i see but the tutorial i followed was using BP's

#

and it seemed to work fine

#

so what the hell happened

uneven cloud
#

You need to delete the point link. Having them both will confuse the path following.

fading moat
#

hm, removing the point link actually prints

#

so it goes through

#

but he's still not jumping

#

argh for fucks sake

#

why's he not jumping now then

uneven cloud
#

Do you see a Link being drawn?

fading moat
#

you mean this? yes

#

if it matters the dark green is going through the fence

#

i lowered the fence just to test

#

still does not jump, but prints

#

😕

dense owl
stoic cove
#

Oh yeah ok. One thing i worry about is physics and collisions though. Not sure how that will work since you only got a capsule component to work with which wont work well for a large tank model. Unless i can have the tank model attached so it is seen as part of the physicsmodel. Not sure if that will work though. Not at home tot test it out sadly.

neat hatch
#

how do I make the ai perception detect the component of an actor?
like a static mesh using the physics simulation and the ai perception seeing that mesh

dense owl
neat hatch
#

hmm

#

then it means that I gotta use a overlap event for this

#

this is how I'm getting the actor btw

neat hatch
dense owl
neat hatch
#

yea

dense owl
#

Then just fake it

#

Store that location on throw, and give it to your AI

neat hatch
#

overlap event it is

#

cause for some reason the ai perception is not detecting the rock mesh

dense owl
#

Your AI will detect actors

#

Not meshes

#

If you want it to detect a rock, make it its own actor

neat hatch
#

I just remembered something

#

I can parent the actor to its rock mesh component

#

or to say it precisely

#

make the actor copy the location of the rock

#

this'll make the actor move with the rock and will make the ai perception detect the actor

#

I gotta try it out

dense owl
#

I mean yes, but you’re still kinda looking at it backwards

#

Your rock should prly be an actor to begin with

#

Not some component

neat hatch
#

so I need a specific blueprint type

#

tho idk what blueprint is that

#

hmm, still no detection

#

this is weird

dense owl
#

the specific blueprint type is actor

neat hatch
#

which is what I'm using

#

ooooooh

#

right, I get it now

neat hatch
#

it ain't detecting still :/

neat hatch
#

alrighty, so I needed a stimuli source for the ai to detect it

polar rose
#

Somehow I've changed something in my project that is now preventing AI from moving in a packaged build. Works fine in editor, my nav mesh is building fine and displaying fine, but in a packaged build, it's a no go.

I even reverted to a previous engine.ini file when I KNOW it was working fine, so it's not a nav mesh setting I've changed.

#

Just dawned on me to check the nav mesh in my dev build and it looks like it's only building nav on a small portion of my world.

dense owl
elder perch
#

I am having an issue where my EQS test isn't getting called for my eqs testing pawn, at all. Have I missed a step?

#

This is the .h file

stoic cove
#

Does anyone know any good doc, tuts on setting up nav agents and multiple nav meshes bound volumes / recastnavmeshes to configure navigation for two differently sizes AI pawns? Been looking everywhere online and can barely find anything. I've also been experimenting in-engine. But from what I've experienced so far it seems extremely buggy and unstable. Adding a volume suddenly breaks pathfinding completely. Nothing seems to connect a pawn with a certain agent,... It's sad that this is so underdocumented and yet so important. :/

#

What I also find weird is that you can set a custom nav data class. Yet, you can't make any as the class is nowhere to be found in the blueprint creation class list.

#

So I'm guessing it's not exposed to BPs?

keen crow
#

is it possible to find usages of BB keys in BTs in 4.27? ctrl+F doesn't seem to be working and in BB window there's no "Find references" option in context menu

keen crow
#

Also is there a point to have instanced node memory for instanced nodes? I've been assigned to a project where this type of stuff happens a lot, dudes were instanciating BT nodes AND having node memory, I wonder what's the use for it if you can already store everything in object's variables in instanced nodes 🤔

urban warren
#

Hi again, so does anyone know how to fix this? Would be extremely appreciated

rare stag
#

Hi, first time working with the behaviour trees and I'm looking for some suggestions, I have the following sequence, at the end I want to notify some actors in c++ and start doing something, what's the proper way to do that?

Is there a way to subscribe to that FinishWithResult or do I have to create a custom task where I would create the event delegate?

tulip steppe
keen crow
#

also be careful with this one
if (!FormationKey.IsNone())
idr for sure but I've had problems with .IsNone() and .IsSet() on FBlackboardKeySelector. The ResolveSelectedKey might be the solution for this, but if your task still doesn't work check if .IsNone giving you a valid result

uneven cloud
# stoic cove Does anyone know any good doc, tuts on setting up nav agents and multiple nav me...

It's really not that complicated.

  1. Write down the agent properties of your different pawns. By default this is the size of the capsule, but you can override the size in the movement component.
  2. Create supported agents in the project settings that match your agent settings and add 1uu. So if the radius is 50, set it to 51.
  3. Build navigation.

You don't need multiple bounds volumes. When navigating, they will pick the best fit automatically.

harsh storm
#

There really is a lack of info on the web about the finer details of UE's pathfinding and navigation stuff though.

uneven cloud
uneven cloud
harsh storm
uneven cloud
uneven cloud
dense owl
#

But that’s a source of revenue for them so I doubt it’d happen

uneven cloud
#

Most of the benefits from UDN is having Epic answer questions. Depending on the contract, they have to answer within X amount of time.

dense owl
#

o.o nice

uneven quest
#

Hi! I'm wondering if anyone has experience with implementing 100'sof AI Actors to follow a player? E.g. like zombies that can attack the player. Even having <100 actors standing creates a lot of lag (I've read possibly due to movement component and/or skeletal mesh+/- animation). There seems to be very different solutions online, and I'm just wondering what works in this context.

uneven cloud
# uneven quest Hi! I'm wondering if anyone has experience with implementing 100'sof AI Actors t...

Most of the expense is the movement component and the skeletal mesh updating animation.

There is the anim budget allocator which will help with the bone update cost.

The movement component is a lot trickier. It was built for precision in an FPS, not for crowds. There's a lot of things you can do, that is going to depend on your project. Optimization is about profiling, making changes and then profiling again. There's no magic button or setting.

There is also Mass AI/Mass Entity which was built for having a lot of NPCs. It however is not production ready yet.

dense owl
#

Speaking of #mass , haven’t seen MieszkoZ in here in a bit. Guessing he’s busy with that

uneven quest
uneven cloud
uneven quest
#

If it doesn't work out I'll look further into Mass AI

#

Not trying to bloat this project too much

uneven cloud
#

Yeah, that's what we do on every project. Making NPCs use nav walking instead walking will help a lot as well. You can set the default walking mode via the default ground movement mode if I remember correctly.

uneven quest
#

Ooh okay nice! Do you implement any avoidance behavior? (So the AI don't get stuck/clumped on each other?)

dense owl
#

for the navmesh walking selection

uneven quest
uneven cloud
uneven quest
rare stag
uneven cloud
rare stag
still crypt
uneven cloud
rare stag
uneven cloud
rare stag
#

That sounds like a good idea

tidal seal
#

Hi, I've a question regarding AIPerceptionComponent, it is normal that I got a callback every frame or so, about perception succesfully detecting my character which is not moving ?

stoic cove
# uneven cloud It's really not that complicated. 1. Write down the agent properties of your d...

Ty for your reply but I had already figured it out myself by messing around and trying random stuff. I finally got it working. The biggest issue was that lot of the navigation stuff doesn't update well. Reloading the level, restarting the engine were basically all it took to get it working. As someone new to this though this is EXTREMELY confusing and frustrating at first. The lack of decent documentation doesn't help that either. Once it works its actually a nice and good system. But figuring it out is def a challenge to say the least.

#

Also encountered quite a few bugs such as navmeshes appearing double until your reload the map, changes not taking effect, ... There's def some bugs in the system that need be sorted out.

#

Also the navmesh color doesn't work until your reload the map.

#

All things considered though these are small bugs and annoyances. But they really make an already complicated thing unnecessarily confusing.

fading moat
#

the code is going through on both ends

#

since it prints on both

#

yet no jumping happens

dense owl
keen crow
dense owl
#

I think there's a setting to register actors that have already been detected or not

#

but if you're using the onPerceptionUpdated function, there are better options

neat hatch
#

I seem to have an issue with the ai touch sense

#

for some reason, there's no trigger when the rock touches the ai

#

I even added the touch sense on the stimulisource of the rock blueprint

#

I'mma watch a tutorial first

dense owl
#

I'd just use an overlap event but 🤷

neat hatch
#

someone did said the ai system is a bit garbage

#

when I looked up

#

and they mentioned its best to use a hit event instead

#

and I see why now...

#

the report touch event ain't doing anything

dense owl
#

The AI system is excellent

#

You just need to use right tool for the right job

#

And the Perception system can be deceivingly complex at first

neat hatch
#

welp, everything works perfect

#

except for one more thing

#

last thing I need is making the ai to never stop running towards the player

#

with "Use Acceleration For Paths" turned on, it stops before it even reaches the player

#

but when its disabled, its a guaranteed death for the player

#

having it enabled and changing the ground friction doesn't help much

#

it still stops before succesfully reaching the player

dense owl
prime glade
#

Am I correct in saying that behavior trees run every frame? Such that when you're in a Wait node/task, the behavior is similar to that of Unity/C# coroutines where you yield execution at the end of a frame, and this yield continues to occur until the Wait duration is elapsed?

#

Hmm, okay 👀 my understanding is that BTs run on the game thread and that every frame (when the BT isn't already running), there is an evaluation of the behavior tree. While the BT is running, each node/task may take longer than 1 frame depending on their configuration.

uneven cloud
uneven cloud
prime glade
autumn sluice
#

Is anyone using EQS with StateTree? The return data on EQS is async, and I was wondering how other people implement it. I have a parent running an EQS task but as of 5.2 it looks like the parent state is just calling repeatedly instead of once. No code changes, so I'm thinking about changing how I do these queries

proven elk
#

not sure if this is an "ai" question, but what should I do if I want my AI locomotion animation matches with its scale? For instance, I spawn a bunch of the same AI blueprint but with random scale, but the locomotion animation is still in sync and don't feel foot sliding. Is there something I should do with the blend space?

autumn sluice
#

Is this a 5.2 bug? Placing ANY task so far in a parent state causes all state tree functionality to stop, with or without transitions defined. The documentation says this should be possible and this worked in 5.1 just fine.

dense owl
#

Could be, I think STs are still WIP

neat hatch
unborn sphinx
#

Is it possible to have both an AI and Player controller on a single pawn, and switch between control or even blend control between the two? As the player provides input, it could influence the pawn's movement gradually more and more until full control is taken?

dense owl
neat hatch
#

I had that enabled, now I've disabled it and now the ai won't pause after reaching a certain distance with the player

dense owl
dense owl
neat hatch
#

disabling that would make the ai start and stop movement instantly

#

tho I wanna make the ai move more natural

dense owl
#

Yeah, you can use that in conjunction with the braking distance

neat hatch
#

but anyways, the issue doesn't seem to be visible anymore after disabling the Update Nav Agent option

dense owl
#

Odd, but 🤷‍♂️

neat hatch
#

probably cause of how the ai has a collider which is used when the player is caught

#

and that option considers the collider as part of the ai collision radius

#

but idk

spring inlet
#

can i change the navigation modifier volume entry cost for one specific NPC? guess i have to set the default nav filter class to one which overrides the nav area costs

stoic cove
#

Is there a way to exclude an agent from it's own modifier? Imagine a large pawn that has a nav modifier so that other pawns don't collide or get stuck against the large pawn. This also prevents similar large pawns from colliding which eachother. HOWEVER, this also causes the large pawn to be subject to this modifier. Meaning path generation starting from the large pawn will always first look for a starting point outside of the large pawn's own high cost modifier which causes issues.

#

nvm I found a way

spring inlet
#

my NPC starts walking around even without behavior tree... anyone has an idea why that could be?

neat hatch
spring inlet
#

yea found it...

#

my fricking onHit event fired for some reason

#

so it tried to get out of the way of smth

pallid smelt
#

Hey, so I was thinking about making an air combat game (e.g. Ace Combat) but I'm not really sure how to approach making a somewhat believable enemy AI.
I mean making it so, that it flies towards an objective and maybe veer off when the player is in a certain range seems doable. But how do you make it so that its attacks on the player seem believable?
I'm not trying to make anything realistic or a simulator. Arcadey and fun are the goals here and therefore tricks and cheating are totally fine with me.
I'm mostly looking for advice on how to generally approach the topic or if anyone knows any good ressources/blog posts/plugins etc. on the topic.
Any help is much appreciated 🙂

solid bluff
#

Any help with navmesh not updating during runtime?

still crypt
# pallid smelt Hey, so I was thinking about making an air combat game (e.g. Ace Combat) but I'm...

I don't have any experience with such things, but

  • There is no 3d pathfinding in engine (you might not need this though, if your level geometry is simple like AC)
  • Boids Flocking is a good thing to look into for avoiding obstacles, other aircraft and group behaviors
  • Moving into position to attack a target is probably the hardest part. I guess Lerping velocity to point at your target/ slightly ahead of your target is probably a reasonable thing to try at first. You will probably have problems with over-shooting and turning circles. You'd need do some maths to calculate if a continuous spline/ curve can be drawn from your current location to your target location and then make decisions based on that - slow down/ gain distance first ect.
uneven cloud
stoic cove
#

Thanks will look into it

#

Ok yeah that was exactly what i was looking for 🙂

#

How much more expensive is the detour controller though?

#

it works brilliantly, but I might be a bit worried about it's performance impact as I'm sure this awesomeness doesn't come free ;P

pallid smelt
still crypt
#

On the note of avoidance - People always seem impressed with Detour crowds, but my own experience with it has been pretty poor:

  • The avoidance works well enough, but its limited to characters that share a nav agent (Unless this has changed recently?) So no avoidance between big and small enemies
  • Like RVO its still local avoidance only, so if an NPC is blocking a corridor or whatever, others will not try find a different route all together
  • It disables thread pulling and post-process move stuff which makes the pathing look a lot worse on complex paths

Am I doing something wrong that I have these problems? It hardly seems usable to me.

Something I've been experimenting with lately is spawning nav modifiers (well using an object pool but still) under NPC two or three times a second. They do not move with the NPC, and have a high entry cost but default movement cost. It helps with avoidance if the character is still, and when moving they prevent NPCs from forming lines. Of course there's a performance cost to turning nav modifers on and off, but am I still going to run into big problems?

sudden citrus
#

before I go complain on UDN - has anyone else noticed that reflection captures rebuild triggers a rebuild of navmesh debug geometry when starting PIE, if navmesh debug draw was enabled in the editor?

floral hound
#

Hi, I'm using detour crowd and i see that bots have problem with avoiding bigger Actors (like vehicles). Any ideas? Maybe there is better solution then Detour crowd?

sudden citrus
floral hound
#

Do we have any other build in solution for this?

sudden citrus
#

there was a workaround to set the vehicles in your case as dynamic obstacles in detour crowd

#

I can't dig the actual Epic response up atm

floral hound
#

ok, thanks

pulsar turtle
#

[Reposted from #blueprint message]
I'm pulling my hair out trying to get this boss, Virgo, to behave correctly in Unreal Engine 5. She's being a real pain in the you-know-what!

Here's the deal: Virgo is untouchable and whenever the player gets closer than 1000 units, she's supposed to let out a big ol' scream, pause for two seconds, and then zip straight through the player. She leaves behind a smoke trail that damages the player slightly, and then after a mad dash of 4000 units, she ends up 3000 units away from the player.

That's not all, though. She's also supposed to remember where the player was 1.5 seconds before she made her dash, so the player has a bit of time to dodge her smokey trace. But I can't for the life of me figure out how to set up the logic for this "Movement Attack".

I've been trying to see this as a task Blueprint, but it's just not clicking. It's all nodes and graphs and it's really got me stumped. Can anyone point me in the right direction or give me some advice on how to tackle this? I would appreciate it big time!

a more clear picture from what i have in an image!

dense owl
pulsar turtle
#

wait what

#

i wrote Unity

dense owl
#

😀

#

Which one is your dash, the scythe attack?

pulsar turtle
#

gf also always get confused because i keep saying Unity instead of Unreal xdd

pulsar turtle
#

Scythe attack is basically when all skeletons are dead, she's will be fighting the character.

basically like a 1:1 with the boss yk

dense owl
#

Ok, so before that attack task I’d add a task that grabs the enemy target’s location and stores it in a vector bb key, then a 1.5 wait node

#

Then move to that stored location and perform the attack

pulsar turtle
#

writing notes, sorry for not instant replying hehe

dense owl
#

Tho idk what that skeleton check service does, so you’ll have to make sure your branch doesn’t keep firing

pulsar turtle
#

BTService_BTSkeletonCheck basically only checks if the behavior tree for the skeletons is Active or not. aka if they're alive or not.

dense owl
#

Ok

pulsar turtle
#

alright, i'll continue with this and see where it leads me.

will post an update on where it lead me to :D

pulsar turtle
#

however, storing the location in a key was definitely something i might've needed help with aswell dx

dense owl
#

If you’re reusing the dash in the movement node, just add that movement node before the attack

#

Also note that BTs have their own MoveTo node for normal nav (basically the equivalent of AIMoveTo)

pulsar turtle
uneven cloud
uneven cloud
pulsar turtle
uneven cloud
pulsar turtle
#

i never had to work with the Geamplay ability tab or classes, i'm not really familiar with them.

i've got a project to submit in the next month, and i doubt that i'll be able to pick it up in this short timespan D:

#

BUT, if it's a better option to go for, it's definitely something i can write to to look into once done.

dense owl
pulsar turtle
#

nononoono, definitely no CPP for now that's for sure MonkaW

uneven cloud
#

There are market place things that do the C++ set up for you.

#

The main point is why are you doing this in the BT? Abilities aren't really AI. Even if you don't use GAS and roll your own simpler version.

dense owl
harsh storm
#

Just remember, code plugins are a per seat license. So everyone on the team will need to purchase it legally speaking

#

Or of course, you buy it for them.

uneven cloud
#

I think the GAS helper is free

harsh storm
dense owl
#

well if I do end up using GAS, I'm going to learn more cpp anyway

harsh storm
#

Admittingly, I don't look much because I don't use GAS. I have my own, much more simple, version.

dense owl
#

I don't rly trust third-party stuff

uneven cloud
#

GAS is really good if you are doing multiplayer. Replicated montages and prediction. Otherwise it's kind of a beast.

dense owl
#

yeah, I heard mixed opinions on it thus far

harsh storm
#

I am 😅. But I still prefer my simple, homegrown solution. Definitely not as robust as GAS though!

uneven cloud
#

GAS takes a bit to get used to, but it makes creating abilities so easy.

dense owl
#

I do want to try it eventually, so far I haven't rly had any complex abilities aside from spawning an emitter or launching a projectile, but I'm working on new ones so I might need it

still crypt
uneven cloud
still crypt
uneven cloud
# still crypt Alright, but then in what situation is a dynamic obstacle acceptable/ useful?

No one can answer that for you. Performance isn't black and white like that. It depends on your project. You get 16ms per frame for a game running 60 fps. The more stuff you try to do, the more you have to be concerned about performance. That's why I told you to profile it.

I worked on a small project years ago where I tried what you are doing. It worked, but it was too expensive to ship. Things that moved occasionally were fine, but not not multiple things in nearly constant motion in the same frame.

still crypt
tawdry zephyr
cold trout
#

is there any clever way (or a plugin) that lets me draw the Nav Mesh at runtime in a packaged build

dense owl
wraith roost
uneven cloud
dense owl
#

F8 didn’t work for me when I tried

uneven cloud
#

What configuration were you trying?

dense owl
#

What’d you mean, like debug editor mode?

#

Just running in PIE or viewport

uneven cloud
#

There are different configurations. Development packaged game means all the debugging functionality is not compiled out. Test means debugging is compiled out, but profiling is not. Shipping means that all dev functionality is compiled out.

#

I distinctly remember using F8 on a console to view the nav mesh, but it's been a few years.

dense owl
#

Ah, just normal unpackaged. But I’ll try it again tomorrow just in case

uneven cloud
#

It should certainly work in PIE. You might need to hit P to toggle it on.

dense owl
#

Yeah, P works in editor mode, I was trying to use F8 to view it at runtime

#

Or maybe I hadn’t pressed P yet when I tried

uneven cloud
#

P still works in simulate mode (F8)

dense owl
#

Oh 🤦‍♂️

#

F8 is Simulate?

uneven cloud
#

Yes.

dense owl
#

That makes a lot more sense, i saw you mention it before and I thought it’s some neat way of viewing the mesh during Play

uneven cloud
#

F8 toggles between the 2. It allows you to do a lot of things, like look around the level, change show flags and select actors.

dense owl
#

Oh nice

uneven cloud
#

Show collisions is incredibly helpful, especially if you are having weird line of sight issues. I swear at least once a month something gets added that breaks LoS.

dense owl
#

Hehe, yeah, every time I have to mess with collision channels I end up breaking some other functionality that depends on it, so then I have to find the right set of conditions that pleases every actor 😀

opaque fractal
#

I'm currently having an issue with my AI MoveTo. I've already checked that the NavMesh does exist and is generated in the world. My teammates have 0 issues with their version (I reverted to previous versions too), but my AI just does not Move.

the only difference, is that I got this warning, and I'm not sure how to fix it exactly, searching up brings me 0 results.

LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input '/Memory/UEDPIE_0_TestMap_MainGrid_L0_X0_Y0_InstanceOf_/Game/__ExternalActors__/LevelPrototyping/TestMap/B/2S/0EJZTAZS7TRWOU5BCQPKDH' is in a memory-only mount point

Little more background, I am using Behavior tree MoveTo, but it was not working, so I switched to AI moveTo, and it's still not working

Currently, the behavior tree is stuck on the MoveTo node

When debugging the AI, the Navmesh exist, but the Actor does not seem to be picking a NavGrid, as in clicking numpad 5 to debug the navgrid and nothing shows up (it was showing up before)

I've tried deleting all the cache files and regenerating, also tried reverting all my changes and grabbing the latest from my teammates, and even asked my teammates to send me their content folder to see if anything works

I've tried regenerating the NavMesh by deleting the old Nav mesh bound volume and creating a new one, still not working

anyone faced a similar issue before?

uneven cloud
opaque fractal
uneven cloud
opaque fractal
uneven cloud
opaque fractal
#

My teammates character movement speed is 100 and theirs are working fine

#

I’ve already reverted everything and I’m still having this issue

uneven cloud
#

You can have collision that is invisible.

opaque fractal
#

I’ve also debug collision to view all the colliders, no colliders blocking it

uneven cloud
#

Then you need to step through the code to figure out what is failing.

dense owl
opaque fractal
#

The Ai just wasn’t picking a nav quad when clicking numpad 5

dense owl
#

What is the movement result when using AIMoveTo?

opaque fractal
#

Returns fail

dense owl
#

Drag off the movement result output pin and see which one it is exactly

opaque fractal
opaque fractal
#

I’ve even tried making a brand new map just to see whether there’s anything affecting it, still have the issue

dense owl
#

If you made a new level, added nav, and still can’t use AI movement, I’m running out of ideas here

dense owl
opaque fractal
#

at this point im now doing my most desperate move and am rebuilding the entire engine, will let u guys know in a few hours once its done ☠️

nocturne kelp
#

hey

#

my ai doesnt walk what can i do

#

i added navmesh

#

and everything

opaque fractal
lyric flint
#

I am lost in programming world 😵‍💫

#

Cpp is completely different in ue for game dev

harsh storm
#

No it's not.

fluid cedar
#

Hello

#

Which is better practice?

#

Storing AI data in AI pawn or in AIController?

fluid cedar
#

And where should I make instance of this struct?

harsh storm
#

There isn't a "better" practice. Store it where it makes sense for your project.

fluid cedar
#

Okey, thanks

#

I thought something is better "architecture" of game

celest python
#

Body is pawn

#

Do brain own the data or the body?

sudden citrus
#

AI design question: how would you model sound occlusion for AI perception in a game with levels resembling Dark Souls?

#

or do we just forget it and give them 360 vision

celest python
#

They recently released some short videos about their own systems

sudden citrus
#

I have a feeling it will be super expensive and client based 😛 but let me have a look yes

#

do you have a link? it's not very easy to find

celest python
#

I saw it on their linkedin

#

Massive Entertainment

sudden citrus
#

cheers 🙂

sudden citrus
#

yeah just found it, at a glance it sounds like our audio eng system - raycast everything around and classify the space?

celest python
#

I dont know much, there was another video they dive into more details but couldnt find

#

but yeah basically seems like it

fiery elbow
#

Looking to develop ai code for a card/board game. Something like tic tac toe but a little more complicated. Would a behavior tree be a sensible way to implement this or does it make more sense to just code it like normal? It’s turn based, doesn’t involve any player movement / seeking so I’m wandering if there’s still any advantage to using the behavior tree tools or if that’s sort of a waste of time

celest python
#

It sounds like utility would fit better to me

#

at least in majority

#

in specific cases BT could interop with utility

stiff matrix
#

Is there a way to use Nav Modfier volume and nav links inside an actor, cause I'm randomly generating my terrain from different actor pieces. Nav invoker works fine so far but not sure if I will need those extra options in the future

#

Does nav invoker automatically update nav mesh if for example gate is openned or wall is destroyed

#

or do I have to leave the area and return for it to update (as it is attached to my player character)

uneven cloud
stiff matrix
# uneven cloud You can use a nav modifier component. There are ways to use a nav link proxy in...

Then invoker will cover most of my suspected issues and I only have and need one of them. My level combined actor is built out of many different actor pieces but they only get called a single time when spawning.
About putting nav link proxys inside of an actor, do you know where I can look into it some more? Or do I have to create a different actor class then call it as a child in the main one?

uneven cloud
stiff matrix
fast basin
#

is it possible to use the same playercontroller for both players and ai? I have tons of events that would need to be shared and all my logic right now runs through the player controller. I'd prefer to not have to redo my entire game around a totally different controller

dense owl
fast basin
#

The AI will need to manage things the same way the player does

dense owl
#

Yeah, I have the same setup

#

PC has the events. I have 2 diff AICons to possess player or actual AI and run BTs or receive AIMoveTo commands in some cases

fast basin
harsh storm
#

The only way to do what you want done is:

  1. Source edits
  2. Components

I'd say the 2nd is the easier of the two.

#

That's how you can share functionality across two classes that are unrelated or in a different fork of inheritance

dense owl
fast basin
fast basin
harsh storm
#

The only way is if you add this functionality in the AController class

fast basin
#

I assume that isnt worth it

harsh storm
#

It's not.

#

To maintain a source build just for this, when doing it through a component would work just as well

fast basin
#

so clearly I've screwed up my project then. This begs the question, what is the correct way to maintain core "player" events for both the player and a "player" ai? Is the component the best way or is there a better standard practice?

dense owl
#

There’s more than one char in a strategy game

dense owl
#

The functions for my units are on their individual bases

fast basin
#

my confusion is how to handle the management side of the strategy game with an ai. Things like setting down buildings or diplomacy or whatever else

dense owl
#

I haven’t gotten that far yet, I’ll have to figure out if BTs are the way to go, or some other AI tool

fast basin
#

BTs seem rough for my purposes, I might try to use the EasyUtilityAI plugin because it has some sort of task scoring system built in, which is what I am familiar with from real strategy games

#

though I have 0 experience with implementing AI at all

#

I only hope it isnt as painful as learning multiplayer

uneven cloud
fast basin
tame pollen
#

Can I have that set on Dynamic in multiplayer? is it expensive?

fluid cedar
#

Hello, I have custom C++ decorator derived from UBTDecorator

#

I've added it to the one branch of a selector

#

And I've set Observer aborts to Self

#

Everything works except aborting

#

Branch doesn't abort when decorator value change to false

languid shard
#

hi, I wanted to get an opinion about how to make game state wait for several pawn to complete movement to a certain location

#

keep a counter in GS and wait for finished events originating from pawns' UPathFollowingComponent?

#

or something better?

rare stag
#

been struggling for the past 6 hours with an assert inside \Engine\Source\Runtime\Core\Public\Delegates\DelegateInstanceInterface.h line 118 specifically Assertion failed: bConstructed
I have a BTTask that creates a timer with a delegate, inside the timer, on certain conditions it invalidates the timer. When that condition hits, I get the assertion error. Any ideas what I'm doing wrong? I have a similar BTTask that works with a timer similarly.

#

the .h

rare stag
#

changed the callback function to void and redid the logic inside so it never returns, that seems to do the trick. So I guess delegates should never return?

harsh storm
#

Multicast delegates, yes.

stiff matrix
#

Hey guys, Im a bit stuck with behavior tree. It works as intended but after a bit of troubleshooting I found an issue, thought I don't know how to fix it.

The issue: This branch goes into selector between Sound Investigation and moving to Random Location. Sound works fine, it moves to where it last heard the target, it waits 5 seconds and forgets, then it goes back to moving to random location. But if its already moving to random location which uses AI Move to, then no matter if it hears player, AI wont react until he reaches the random point its moving to. I tried couple of things but it mostly just broken the whole sequence.

Is there a way to abort whole Task if player is heard and how would I go about doing it. I tried a few things with Blackbords, bools and clearing data but it didn't do much.
Thanks.

dense owl
dense owl
stiff matrix
dense owl
#

and yeah, I just broke mine down into subtrees

harsh storm
#

I would like it if subtrees were able to be a bit more dynamic in nature though.

#

Like, that plugin...what is it called.

#

This one

dense owl
#

ah, so you can customize params in them? yeah, I can see how that could be useful

stiff matrix
#

Yup seems to work fine, thanks a lot

tidal lodge
#

hey guys. anybody using root motion movement together with ai move to? my problem is that the char often cant reach a point while running. its only running in a circle arround the point where he should go to

dense owl
#

that usually means your goal location is above or under the mesh, but I haven't played with root motion

harsh storm
#

I meant to ask you back when you made this comment - but have you done a stress test with a basic nav movement component?

uneven cloud
uneven cloud
harsh storm
#

I've long thought about doing it just to see how much of a difference it would actually make vs just optimizing the CMC.

#

I make enough zombie games - surely it'd eventually pay off 😅

dense owl
#

Maybe before 2020 😀

celest python
#

I made stress test with floating pawn movement back at 2019 on Huawei P10 Lite phone, which is extremely low end. It was able to afford 25 walking NPCs with pathfinding and MoveTo

harsh storm
#

UE on mobile? Gross

celest python
#

Mobile? Gross

#

here fixed

dense owl
celest python
harsh storm
uneven cloud
dense owl
#

/offtopic Huawei isn’t 😀 /offtopic

dense owl
celest python
#

Nav walking isnt 100% reliable though

uneven cloud
dense owl
#

ah, rite

celest python
#

Gotta do checks regularly to push it back to navmesh

harsh storm
uneven cloud
fluid cedar
uneven cloud
# rare stag been struggling for the past 6 hours with an assert inside `\Engine\Source\Runti...

You have a lot of problems with your code.

  1. You aren't handling abort at all.
  2. Is this task instanced?
  3. So many pointers not being checked. Every uobject should be checked with IsValid
  4. Don't use is valid low level for gameplay code.
  5. Your gather callback functionality is wrong. There is a function you need to call to end the task instead of using a return value.
  6. All those hardcoded blackboard key names. Do you know what blackboard key selectors are? Do you know the template blackboard functions?
uneven cloud
uneven cloud
stiff matrix
uneven cloud
stiff matrix
#

Alright, makes sense, thanks

uneven cloud
tidal lodge
#

@uneven cloud its already at 500 units

#

i guess the problem is my animations for sprinting. the sprint left and sprint right gives me the nice circle that its doing while trying to reach the point

#

so it has no animation at this movement speed to be able to get to the point. i hope that makes sense

#

and the move to isnt clever enough to turn in place to get there

uneven cloud
tidal lodge
#

how can i see it?

uneven cloud
#

Use the visual logger. Add a log each tick and then step through it's movement.

tidal lodge
#

its exactly doing this movement arround the point it tries to reach

dense owl
#

I mean I like it, looks like the goat is having fun

#

But it doesn’t seem you’ve tried the visual logger as instructed

tidal lodge
#

never used it. just trying to find it

dense owl
#

in Tools -> Debug

tidal lodge
#

jeah i know where it is but not how to use it and get a number from it

dense owl
tidal lodge
#

jeah got this i can also see the points where he should move to

#

but not the movement of the animals and also not the speed

dense owl
#

are you using a BT MoveTo or regular AIMoveTo node to move it?

tidal lodge
#

bt move to

#

when i enable this its working without problems but have no anims for turning

uneven cloud
#

Did you follow through instructions I gave? Specifically logging every tick?

From your video it looks like your speed is too high for your rotation rate. It can't possibly get to the goal because of that.

tidal lodge
#

i am pretty sure that is the reason

#

so i think the only possibilty is to have other animations with higher turnrate?

#

or lower the speed but than the animal cant RUN away

uneven cloud
#

Yeah. This is one of the many reasons why no one uses root motion for locomotion.

tidal lodge
#

but looks so much nicer ;D

uneven cloud
#

Not really. It's running around in a circle unable to get to the goal location.

harsh storm
#

Root motion is best used for like one off animations imo.

tidal lodge
#

jeah i think in the end its the easiest way to redo the locomotion with normal ip anims

#

thanks for your help guys

steel raft
#

Hello

I have small problem with AIMoveTo (BP Node).
Somehow, the On Succes triggers several times and I have to put a big enough delay so that the action that comes next triggers once.

For my example, I doing a navigation path with an array of points. Upon arriving to one point, I increment a integer by one to get the next point. If I have no or a small enough delay, it will increment one more time additionally. Anyone have any idea on fixing this problem beside an delay?

dense owl
#

For one, toss that delay

#

And second where is this code being run, on what event

steel raft
#

Event Tick -> Custom Event called MoveToLocation

dense owl
#

You’re a crazy man

steel raft
#

under the logic that it hasnt detected the player or ally

dense owl
#

So you’re telling it to run the same MoveTo 60+ times a second and then wondering why it’s succeeding multiple times in a row?

steel raft
dense owl
#

No, do not put delays on Event Tick

#

They do not do what you think they do

#

If you want to have something that tells it to move somewhere when it has a target set, use Behaviour Trees

#

Watch the 3rd video link in pinned in its entirety, that’s the shortest path to understanding the basics imo

steel raft
steel raft
dense owl
#

Did you add a Stimuli Source to your target?

steel raft
dense owl
#

And you configured your AI Perception to use the Sight sense?

#
  • edited the config file like they did to bypass the friend or foe system
steel raft
#

Yep

#

And yep

dense owl
#

K, so what happens exactly?

#

Or I guess you said it doesn’t trigger

#

Did you use the AI debugger at runtime?

steel raft
#

Yes

#

I also print a string "I see you" instead of setting the actor

#

But breakpoint dont trigge so

dense owl
#

Did it look like it was detecting it at any point

steel raft
#

No, it dosent seems so

#

Hmm

dense owl
#

Does it show as being in range of your AI tho

#

Like is it showing as being inside the 30 degree cone you can see with the AI debugger

steel raft
#

No, it dosent detect the player how much I move it around when simulating

#

I got it working 😄

#

Perception System Class i Project Settings was set to None

runic zealot
#

Anyone familiar with using gameplay tags on blackboards?
Tried doing some generic implementation to see if I could get it working - for what would eventually become more advanced Ai - but the blackboard doesn't seem to be reading the tags from my actor correctly/at all (condition isn't being met)

ancient wedge
steel raft
# dense owl Any info there? Was it in range?

Hi, I want to say thank you for the help yeserday.
It seems so easy with BT.

Moved most of my crazy logic for enemies and allies towards. Now I am just figuring out if there is a way to set the wait time through a blackboard variabel or do I need to create a delay in one of my task, ex execute movement

dense owl
#

Are you trying to adjust the wait time on the fly?

dense owl
#

Speaking of which, I have a similar question about BT nodes, which I may have kind of asked before. How come things like Wait time, or Acceptance Radius are not built to use Blackboard Key selectors, so you can adjust them as needed, and is there another way around that?

#

Aside from going back out of the BTs and using AIMoveTo nodes and whatnot, which can be a bit counter-intuitive when you're trying to use BTs

#

found this reply from MieszkoZ in 2014 😃 :

"Not yet, at least not in Blueprints. But there will be in 4.8. Stay tuned.

In C++ it’s the usual way - derive from BTTask_MoveTo and instead of using AcceptableRadius call a function on your AI.

Cheers,

–mieszko "

#

Why have you forsaken us, MieszkoZ ? 😃

sacred holly
#

Hey everyone, I have created a new EQS test and I would like to use the test score. It never seems to update however. I am making sure the values are within 0-1 but even if I set the score to 0 it never uses the score. It only checks if the test is a success or not. I have already restarted the engine, but this doesn't change anything either

dense owl
#

you can press / to expand the list of actors that are being tested

sacred holly
dense owl
#

when in AI debugger mode, press numpad 3 to show EQS, then press /

sacred holly
#

It simply gives it a score of 1

#

Even though my score is set to 0 and I have made sure that there is only 1 test being performed

dense owl
sacred holly
#

Yep

#

But it still gives a 1

dense owl
#

why? what's the point of your test if you force it to give you one value?

sacred holly
#

Because it uses the test success instead of the test score

dense owl
#

what are you trying to achieve here

sacred holly
#

My actual test is calculating angles between positions to keep my enemy in around the same angle

uneven cloud
sacred holly
uneven cloud
sacred holly
#

Pic 1: Code to get angle between two locations.
Pic 2: First part of test, the blurred out part is the player
Pic 3: Second part of test

#

But even if the float score was 0, shouldn't that still cause the EQS to be 0?
The attached pic was made when setting the score to 0, how come the score is 1? It seems to be using the 'Test Success' instead of the Test Score, even when the test type is set to float

uneven cloud
sacred holly
uneven cloud
#

I don't know if that works as you want it to.

#

What behavior are you looking for?

sacred holly
#

What I would like is for my enemy to prefer staying in the same angle from the player

#

So the closer he is to that angle, the better

uneven cloud
#

What do you mean the same angle as the player?

sacred holly
#

No matter where the player goes, the enemy should want to stay in the same angle

#

Lets say initially the enemy is in front of the player, lets say his angle is 0.
What I want is for him to stay in that direction from the player, so his angle stays around 0

uneven cloud
#

Do you mean that if they are in front of the player, they should stay in front of the player?

sacred holly
#

No, because player rotation should not matter

uneven cloud
#

Then you want the dot product between the querier to player and querier to item.

#

When comparing angles, you really shouldn't use the expensive functionality to get the actual angle. Learning how the dot product works is INCREDIBLY important for AI.

sacred holly
#

Like in this beautifully drawn image. Player is blue and enemy is red.
The left is the initial setup, but then the player moves bottom right.
I would want the enemy to position around that new black line, the further he strays away from that angle, the worse the position

uneven cloud
#

What is angle 0? An angle is the angle between 2 vectors. In your image there is only one vector.

sacred holly
#

In my code I use 2 directions; A world direction which I set to (1,0,0) and the direction between the player and enemy

uneven cloud
#

I still say that this is what you are actually looking for: you want the dot product between the querier to player and querier to item.

#

Why would you use a world direction of (1,0,0)?

sacred holly
#

Because I would want the angle to be the same no matter where I am in the world

uneven cloud
#

That doesn't make any sense.

sacred holly
#

Well my complete final goal with my AI system is to reproduce or at least try to recreate the aggression system in GoW
https://www.youtube.com/watch?v=hE5tWF-Ou2k&t=728s&ab_channel=GDC
From this vid
I have already got quadrants working, shapes, etc.
And maybe I am going about this wrong because it shouldnt be as hard as I make it out to be lol, but I just want the enemy to be where I last saw him

GDC

In this 2019 GDC talk, Sony Santa Monica Studio’s Mihir Sheth covers how they implemented combat systems to deliver a bold new action experience that evolved yet stayed true to 'God of War.'

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 developmen...

▶ Play video
uneven cloud
#

You really should try what I recommended and learn more vector math.

sacred holly
#

I mean, I am using the dot and corss product to calculate my angle?

#

But I will try it

#

The result I get from the suggestion are not what I am looking for
Pic 1: results of dot test
Pic 2: How I expect the results to look like; From green to red, the further away from the angle, the worse the result

#

In the EQS pic the enemy is on the left of the screen (cant show mesh)

#

I know that my personal calculation would give me this result, but the EQS is simply not returning the float value but instead the bool value

#

But I'll keep messing around with the dot calculation a bit
But i would also be trying to get the float value to work

uneven cloud
#

I've never seen EQS tests in BP. Is that new?

dense owl
#

they're there, I haven't used them because why would I when I can just do it in the tree

uneven cloud
#

I mean writing new tests.

uneven cloud
dense owl
sacred holly
sacred holly
uneven cloud
sacred holly
uneven cloud
runic zealot
#

Well crap the interface isn't expose to BP interfaces for me to add without C++

runic zealot
#

Looks like this has been an issue (of not being in BPs) for a while, get on it epic!

dense owl
#

they're busy with other stuff

#

but the gameplay tag interface is very easy to expose tbh

runic zealot
sudden stag
#

recently i started getting this issue where nav mesh are shifted away from where they supposed to be in. i found that changing the runtime generation type to dynamic fixes the issue, for now anyway

#

but what could be the issue?

vast mesa
#

Hello,
I am facing an issue with Behaviour Trees. It seems that after executing a "Play Animation" task, my AI pawn stops using its animation blueprint, and just starts T-posing. It's as if the animation BP is no longer active.
Everything is ok before this "Play Animation" task is executed. The animation does play successfully, but after that, its just T-posing.

dense owl
sudden stag
#

when i hit play usually. but now it happens even in edit-time too lol

#

unless i move the nav volume it corrects itself but then i hit play and shifts again

dense owl
#

that's very weird. I assume you tried deleting and remaking it?

sudden stag
#

yep

#

no luck

#

i've also tried to add another seperate volume on another part of the level, still the same issue

dense owl
#

you're not messing with the nav mesh dynamically anywhere are you?

sudden stag
#

nope. i even deleted and re-added the navmesh to break any references i have to it

#

actually thinking about would "debug editor" build config cause the issue?

dense owl
#

one way to find out

sudden stag
#

because i've also noticed that half of the capsule collision not being rendered lol

sudden stag
sudden stag
#

nope that didnt fix it. but it is closer now 🥳

uneven cloud
uneven cloud
dense owl
timber stag
#

hey guys, how do I make an AI follow another AI? turns out running an EQS query and setting the target location isn't it

vast mesa
uneven cloud
uneven cloud
sudden stag
warped sorrel
#

Does anyone have any idea as to why a nav link proxy I made will work if placed normally in level but wont work if its created as a child actor inside a blueprint?

timber stag
#

it doesn't move

uneven cloud
timber stag
#

Thank you!

dense owl
uneven cloud
keen crow
#

is it possible to export vislog data to some parseable format? csv or json for example. I kinda did some A/B testing and now need to process vislog data but I don't thing vislog window provides any sort of grouping and aggregating results 🤔

rapid obsidian
#

I'm trying to check for pawns in these points, if there isnt one its a good spot to choose from. but it always gives it a score of 1. Any tips?

#

maybe i need to watch more EQS tutorials I may not understand it well enough yet lol

#

seems to work okay on the querier but not player

dense owl
rapid obsidian
#

will do thank you

proven elk
#

Is there any way to debug which state our AI at in the State Tree? I tried ' but it doesn't show any helpful information

faint hare
#

Is there a way to connect 2 far away points on a navmesh to make an AI believe they are connected?

pine spade
#

Is there a way to force the AI controlled pawn to stay facing the player when executing a Move To task? Or does this require a custom task? Most of the tutorials I've seen talk about simply adding a movement input to the pawn/character for strafing, for example, but I want the AI to move to specific locations while facing the player. It also seems like this movement input method doesn't account for pathing (strafing into a wall, for example). Has anyone achieved this before?

timber stag
vast mesa
# uneven cloud The built-in task makes the animation a montage. I would check your montage fun...

My AnimBP is very simple. Anyway, it seems the way around this is to trigger the animation from the controller and then sync with the blackboard using a BB key. However, it does not work well since sometimes, it goes into the last Wait node, and the anim does not sync. I am using a custom enum to track my enemy AI's state in BP.
I removed the Play Animation node, and instead set the enum in the Controller code.
Then once the montage finishes playing, I set the state to Chasing.

I basically, just want my monster (I am making a horror game), to play a one-shot "Scream" montage when the player is spotted before chasing the player.

vast mesa
vast mesa
#

Ok, I have a solution, that I will post here for others in case anyone else has the same issue. It seems that the built-in play animation node unloads / disables your animation BP, and plays the animation you set on the node... At least that is what I got from the comments from this Youtube Video: https://www.youtube.com/watch?v=94WLK3AGZ7Y
So, you need to make your own custom task, that simply calls Montage_Play on your Pawn's Animation BP.
I simply set a delay to match the time that you get from the the Montage_Play, then finish the task.

What is the Play Animation Task Node in the Behavior Tree in Unreal Engine 4

Source Files: https://github.com/MWadstein/wtf-hdi-files

▶ Play video
uneven cloud
uneven cloud
lyric flint
#

I am seeing some tutorials of ai of ue

#

What this green thing called? It help to move ai in only this green area

lyric flint
#

green navmesh is not showing on pressing p, I don't know why

dense owl
lyric flint
dense owl
#

make sure you select the landscape or empy space before you press P

lyric flint
#

??

lyric flint
dense owl
#

oh hold on

#

you added the wrong thing

#

it's NavMeshBoundsVolume not Modifier

#

the latter makes holes in the navmesh afaik

lyric flint
dense owl
# lyric flint

idk what you're showing me, is there a language barrier?

#

NavModifier is not the navmesh

#

it's used to make holes in it

#

you should have one of those.

#

And I believe it comes with a RecastNavMesh as well

lyric flint
#

ohk, @dense owl thanks, I am testing navemesh first time

uneven cloud
dense owl
#

ah makes sense

#

you have to build paths for the mesh to work, right?

faint hare
#

Is there a way to alter Nav Links to allow them to just connect two points regardless of distance

alpine rover
#

my ai does not complete this moveto task, in debugger it has a set location but the navmesh segment does not appear. (BT is just retrying from root on a loop during exec)

dense owl
# alpine rover

Check your Target Location vector to see if maybe it’s above or under the mesh. It’s also good practice to have a fallback behaviour (like a wait node after it)

#

Else try to rebuild your navmesh

uneven cloud
neat hatch
#

What would I need to have a working ai mechanic where it would go to the nearest actor to the player and then begin to patrol around that target after it reached its location by a few meters?

#

My thought is simple parallel, but I never worked with it yet, only thing I know about it is it has two tasks with different use

neat hatch
#

after a bit of debugging, it seems the nearest actor to player doesn't have its tag changed properly

patent kettle
#

Hopefully this is the correct channel ... How to lower the nav mesh for a BP Static Mesh object? I have added two assets; a boat and a bridge. However, as you can see in the screen capture the navmesh is above the objects, which makes for a fun mini-game to get my character to jump aboard, but not really what I am going for. Any ideas?

dense owl
dense owl
#

Also might be too narrow on the bridge for the mesh to sit on the planks

patent kettle
#

I think I found something ... I had imported these assets and the collisions were large rectangle boxes. So I removed all collision boxes and recreated my own, and multiples where I could then lower them to the surfaces of the bridge and boat. The characters can now walk on the assets instead of having to jump ontop. Not sure that is the best solve, but for now it works 🤞

dense owl
#

Ah, I figured you’d already checked mesh collisions mb

patent kettle
#

Nah, still new to this. But I am learning 😀

terse panther
neat hatch
#

can I use two selectors which I can switch between when their decorators are set or not?

dense owl
neat hatch
#

Basically using separate selectors for different mechanics unless a decorator from the main selector of the two changes

#

But anyways, I already found out and it works nicely

#

Been spending a long time making an ai move to the nearest actor to the player and then guard the actor with a random location patrol if its close enough to it

#

Tuns out I never needed to use any tags

viscid wolf
#

anyone know why my Recastnavmesh settings keep resetting
every time i close and reopen the level/project the agent radius keeps setting back to default like 35

i have changed it in the project settings to (tho there it doesnt reset)

The settings are also the same in the DefaultEngine.ini

No clue how but it just stopped doing this
sooo

yay?

sudden citrus
#

ok I gotta say having to put INIT_DECORATOR_NODE_NOTIFY_FLAGS() in decorator constructors caught me off guard

#

even twice in a week

#

shit just wouldn't work sweaty

rich pendant
#

I have an AI Perception component on an AI controller but i'd like the vision to be based on where the head is actually looking. Is there anyway to set it up for this?

sudden citrus
#

Then rotate the body based on velocity

#

Animation wise

rich pendant
#

I'm triggering montages (search anims) where the head moves based on the animation.

rich pendant
sudden citrus
#

no, do it the other way around

#

you want to tell the AI where to look in AI code, then have animation follow that.

#

don't drive the game from animation

rich pendant
harsh storm
#

If I recall, there is a way to just overwrite where it looks. So do it based on some head bone and then when the head moves, it just works™️

#

I think it is C++ required though.

#

Maybe GetEyesViewpoint? Or something like that

rich pendant
#

I might have to think about it for a bit but to confirm, where the sight is sensing is based on the control rotation on the controller?

harsh storm
#

I can't recall exactly.

rich pendant
#

While i'm here, any ideas why my AI gets stuck here? The pawn doesn't actually rotate. :/

dense owl
rich pendant
dense owl
#

Sec I’ll get you the right setting

#

Precision

#

Play with that, may have to go lower or higher depending

sudden citrus
#

you should have "use controller desired rotation" ticked and not "rotate to face movement"

#

sounds like you've set your characters up for human control

#

and the anim BP rework might be a lot but you'll be better off after it rather than trying to hack your way around what animations are

#

make the game work with capsules and zero anim, then go from there

rich pendant
rich pendant
sudden citrus
#

sure, it can be a tricky area of AI

#

one thing at a time 🙂

rich pendant
#

I've not gotten to it to much yet but the how does the age work for hearing (AI Perception)?

rich pendant
#

Another question regarding BT. I have a branch that aborts based on a BB var but if the branch gets to a specific task, i don't want it to abort, is there anyway to do this?

rich pendant
subtle sleet
#

'Hey,Im new to unreal and I have a question. I have two AI controlled pawns. But one of them need an other agent radius size. I thought I can just make a second nav mesh with different settings. but this setting is controlled in recast nav mesh. How can I have two different Nav meshes with different Agent radius?

uneven cloud
uneven cloud
uneven cloud
uneven cloud
#

Be careful with the amount of supported agents you make. It'll add memory to your level and cause slower loads if you have to many. So if you make a lot of AI, it's best to keep them in buckets of say small, default and large.

rich pendant
uneven cloud
#

Sight is the one that doesn't trigger an event when it's forgotten.

ornate rock
#

Anyone know a way to get the Pathfinding distance between a pawn and a location?

#

like the length of the path it has to walk to actually get there

#

right now i'm using a method where i take literal distances between two vector points, but do it with enough frequencies that it ended up being close enough. But for a tactical game i think it'd be better if the player can see how much it'll take to walk a distance before they commit

#

there's this node... I don't know how to use this node...

rich pendant
ornate rock
#

ah!

#

Yeah it came up when i was poking around n the context menu

#

but the tooltip is not helpful, there's no tutorial video, and the documentation might as well not be there

#

how do i use it?

#

where do i get the nav data and what do i filter?

rich pendant
ornate rock
#

I see

#

alright, thank you

rich pendant
#

Has anyone else experiences an issue where the AI Perception (sight) would glitch when the NPC is close to the player? (NPC move to player type of thing) For a split second, it clears the CurrentTarget (player) which is messing up my BT. It seems like it might be something with the MoveTo task.

ornate rock
#

@rich pendant hey, sorry for the ping, but do you know how to work with this enum?

#

there's no switch or anything on it

rich pendant
ornate rock
#

rip

#

i want to check for situations where the pathfinding fail, and i think that information is buried in here

rich pendant
ornate rock
#

iiii have no idea what that is

#

lol

dense owl
#

watch 3rd pinned link video (preferrably in full, but at least from the EQS timestamp on)

ornate rock
#

Aight, thank!

dense owl
#

also you might be looking for this @ornate rock

ornate rock
#

huh

#

that's smart

dense owl
#

that's ==

hushed atlas
#

why doesnt my spawned pet character follow my main character when i use spawn node but does when i place the actor in the level manually

pine spade
#

In a behavior tree task (or the behavior tree in general), is there a way to link animation durations directly to the logic execution? Simple example, but when I call PlayMontage from a task, it would be great if the behavior tree could just wait until the animation is finished so it's not continually executing tree branches. I know you can add a delay node and match it to the animation duration, but that seems clunky and prone to error if animations change. Is there a better way to do this?

pine spade
hushed atlas
pine spade
#

Make a new variable and set it to exposed on spawn

hushed atlas
#

oh ok

#

how do i get it to show up on the spawn actore node?

#

cause i created the variable in the pet BP but its not showing up when i refresh the node

#

woops, clicked wrong expose on spawn

hushed atlas
pine spade
hushed atlas
#

pet doesnt follow

pine spade
hushed atlas
#

np thx

uneven cloud
uneven cloud
uneven cloud
hushed atlas
#

so it doesnt bump into sht

#

doesnt affect the issue tho, already tried

uneven cloud
#

Using the visual logger should help you track down any errors the move to has.

hushed atlas
#

idk how

dense owl
neat hatch
#

Whats the right way to change the ai controller in the pawn?

#

The current method I am using is either destroy the controller or unposses it from the pawn, then depending on the selected option, the other ai controller is spawned and posses the pawn with it

#

But the errors I am facing are related to the referenced objects

#

And it seems the ai hearing sense seems to break whenever it hears something

#

Maybe I cannot reference the object after the event begin play in the controller and just use the cast node everytime?

neat hatch
#

yup, that was the issue, but now the ai would randomly stop chasing me cause it heard a noise, and that creates a small chance it would become completely confused and stand in place

neat hatch
#

ALRIGHT, fixed it sheesh

#

so note to self, don't destroy an ai controller, unposses the pawn from it instead

keen spear
#

Hey. I have an issue with the AI sencing sight in the back before it has turned. So I fire my weapon to make noise and the AI starts to turn but immediately sees me before it has finished turning.

#

the pheripheral vision is set to 75 degrees

hushed atlas
#

u know how i can make this ai stay on the right side of my main pawn when it follows it?

rapid obsidian
#

Hello, I am moving a minion AI to a spot around a player, But I want it to check if there is already another minion in that spot before I move there, if so then try another spot. Any advice on how to achieve this? This is what i've tried so far.

#

this always return false though even after i set it on the first task

#

And also it will not set it across all minions for that specific spot right? Not sure how to do it against multiple ai

rapid obsidian
#

Instead of get actor right vector just do get actor location then add to it to the right

rich pendant
#

I might be thinking about this the wrong way but I was thinking about using AI Perception to set focus on my AI which I would then be able to use to calculate some head turning in the AnimBP. The issue im having is that it just causes the AI perception to rotate all the way around the AI. I've set the character to rotate to the control rotation when moving which is fine as otherwise, the whole character would rotate when I set focus instead of just the head which I'm trying to achieve.

Would anyone be able to provide me with some tips on how to get it so the characters head/AI perception will rotate accordingly based on what they are looking at. When the head turn has reached it limit, it shouldn't be able to turn any further.

uneven cloud
uneven cloud
rapid obsidian
timber stag
#

@dense owl

dense owl
timber stag
#

I do have a finish execute node

dense owl
#

Like is the MoveTo firing

timber stag
dense owl
#

Tick the Success box

#

Else you’re telling the tree the node failed and it re-evaluates from the top

timber stag
#

still the same

dense owl
#

I think your EQS might be constantly overwriting it

timber stag
dense owl
#

try making a Selector node above your sequence, move the EQS to that one and put a fallback Wait node on the right branch

dense owl
#

almost, make another branch from the selector to the right of the Sequence with a simple Wait node on it

timber stag
dense owl
#

I don't think you need the SetAnimalLocation task

#

you're already setting that in your service

timber stag
#

oh

#

lemme remove that

#

nope, still doesn't move

dense owl
#

ok, your EQS query is finding Actors not Locations, yes?

timber stag
#

also, something else I've noticed, only the hippo gets perceived

#

it's children aren't

dense owl
#

we'll figure that out after

#

lmk on the Query question

timber stag
dense owl
#

right, so you need to store that in an Object type Blackboard Key, not a Vector

#

i.e. TargetActor

#

I imagine your TargetAnimalLocation was a Vector key, yes?

dense owl
#

ok, so make a new BlackBoard Key of type Object

#

TargetAnimal or w/e

timber stag
#

like that?

dense owl
#

yes

timber stag
#

I'v even filtered it to BP_Hippo

dense owl
#

now go to the BT and change all of those tasks to use that key instead

timber stag
dense owl
#

just for sanity check, can you show your navmesh?

dense owl
#

k, and your TargetAnimal is showing as perceived in the AI debugger still?

dense owl
#

also, do normal MoveTo Tasks (to whatever point on the map) work?

dense owl
#

well yeah it's begin play so it'll only fire once

timber stag
#

right yea

dense owl
#

ok, try setting the EQS query Sense to Sight. And in the AI debugger, press numpad 3 to show the EQS

#

and make the range something like 3000 just in case

#

should be working already tho given you have a TargetAnimal set

timber stag
dense owl
#

yeah so the EQS is doing fine, just your MoveTo is failing

#

can you show your updated tree?

timber stag
dense owl
#

is it reaching the Wait node in your sequence or getting stuck in the MoveTo?

timber stag
#

the moveto isn't firing

dense owl
#

oh?

timber stag
#

it's going between the 2 waits

dense owl
#

it could be firing very fast

#

try Pause

#

within the tree

#

and then go Back:Into

timber stag
#

ok

timber stag
#

so it does fire

dense owl
#

yep

#

Need to figure out why it doesn't want to move tho. Go to Tools-> Debug -> Visual Logger , hit Start, then Play

dense owl
#

click on the next bars

timber stag
#

oh wait

dense owl
#

yeah that's what I meant

#

did you set your acceptance radius on the MoveTo task to 5000 by chance?

dense owl
#

yeah that means stop anywhere within 5000 🙂

#

so try 50 or 100 max

#

I was gonna ask you about it earlier but I figured you left it as default 50

dense owl
#

😄

timber stag
#

IT'S WORKING!!!

dense owl
#

k, so what's a child of Hippo?

timber stag
#

you are amazing, I'll give you credit the next time I do something AI related

timber stag
dense owl
#

np

#

ok, it looked like they were being detected by EQS, does it Move to them?

timber stag
#

thanks a lot dude

#

now I need to figure out what I did

dense owl
#

lol np

timber spear
#

If i were to make an AI enemy patrolling using an array. Can I assign what patrol point each instance of the AI will take?

#

Sorry if this is hard to understand. I don't really know how to describe it

#

I just want a flexible way of haing each enemy have a certain patrol path they take

uneven cloud
# timber stag

FYI your move to is called before the EQS service finishes. So you are doing a lot of redundant work with the waits, because you aren't accounting for it.

timber stag
uneven cloud
dense owl
#

I was gonna suggest adding a target set decorator to that sequence node

#

So it doesn’t advance to the MoveTo until it’s ready

#

But maybe shorten the right branch Wait node at that point so you don’t wait too long @timber stag

uneven cloud
#

You want to use the EQS task. Then move to and a service on the move to to update the location.

dense owl
#

Oh I didn’t realize there was a task 😬

harsh storm
#

That's how I always do my EQS stuff 😅

lyric flint
#

I'm trying to use the PathingGrid generator, but running into an issue where it should be generating EQS points, but it isn't. I attached my EQS query in my first image. If I put that query on the EQS testing pawn, no grid points are generated despite having a navmesh (and the pawn is touching the ground since I pressed End to snap it there); see the second image. However, if I move the pawn a little bit lower into the ground, the points are generated (third image).

This confuses me as I thought the projection settings I have, 1024 up and down, should reach the nav mesh. Am I missing something the generator is doing with collision / character capsule?

harsh storm
#

Wait - EnvQueryContext_Item isn't actually defined?? Am I looking at the wrong class?

#

@celest python While you're here - I'm not going crazy, right? 👆

celest python
#

Never checked that specific class Thonk

#

does it have any derivatives?

harsh storm
#

Nope

#

UObject -> UEnvQueryContext -> UEnvQueryContext_Item is the inheritance chain

celest python
#

Well its utilized somewhere in the eqs framework but I cant see anything else either

#

best to ask mieszko when catch him around

harsh storm
#

It'd be funny if he just replies, "lol"

dense owl
#

I haven’t seen him in here in a minute

celest python
harsh storm
celest python
#

I think its used to "filter out" things

#

if its even used

harsh storm
#

This is the context though

#

Not a test