#gameplay-ai

1 messages · Page 47 of 1

dense owl
#

Only time I get official vids on my algorithm is from recommendations from having watched similar ones

misty wharf
#

Epic only uploads 3 hour videos on youtube that have 5 minutes on the topic you want to know about

uneven cloud
#

I think a lot of time people search for "how to make X game" instead of breaking the problems down into smaller problems.

misty wharf
#

Pretty much

dense owl
#

Yeah, probably true

misty wharf
#

Frankly I don't see any problem in even low'ish quality tutorials

dense owl
#

And some of these vids are older so the algorithm prly shoves them to the bottom

misty wharf
#

Sure it would be nice if it wasn't low quality

#

But at least it's something for people to learn things from

#

At least it gives them a starting point

dense owl
#

We’re talking quality of content not quality of image

#

Then we have to field 1000 questions about how casting is bad and shit

misty wharf
#

At least they got started

#

Better than never having gotten started because all the guides are so full of techno jargon on best practices

#

:P

#

Which is what a lot of "good" material is about

uneven cloud
#

I also see a lot of shit tutorials that are "how to make advanced AI," when it's the most basic functionality and shit ways to do things

cedar pumice
#

was debugging maunally didn't call it for any purpose yet

dense owl
#

Meh, first tutorial I watched was 11h of torture filled with stupid stuff. Sure, they did like 5% of things right and “it got me started”. But if I hadn’t found this server I would’ve quit

cedar pumice
#

but i see my keyboard event is not working ?

#

tf

misty wharf
#

Speaking of advanced AI I'm thinking of tossing mine right now because ugh lol

harsh storm
#

Do you mean to use the single "Get Actor of Class" and not "Get Actors of Class"? And maybe the cast fails.

misty wharf
#

it's just a boomer shooter it doesn't need the AI to try and be this clever which only leads into it getting stuck because the logic is too complicated lol

harsh storm
#

I do w/e I can to make my AI simple and stupid. But fun.

cedar pumice
harsh storm
#

Make it as simple as possible. But no simpler.

harsh storm
cedar pumice
#

in character blueprint

uneven cloud
cedar pumice
#

i was supposed to press e and change the ai's states manually to test it, patrolling and attacking me flip floping

harsh storm
#

Player character? Or just a regular ol' character? Are you possessed? Do you have input on the pawn set to accepting input if it isn't possessed?

uneven cloud
#

I've considered making tutorials, but then I'd have to become a you tuber and learn how to market that stuff. Plus I really hate video tutorials. Don't people read anymore?

cedar pumice
harsh storm
cedar pumice
#

that's all inside the character

misty wharf
#

Marketing that stuff is not super hard if you make videos that people naturally search for, but you can also get pretty far by posting them in places where people hang out in

cedar pumice
#

ok i changed the flow control to on result change abort self and it started moving and my inputs are working, but still cannot see me as an attacking target, just standing still in attacking state

uneven cloud
misty wharf
#

Oh I haven't really done any for Unreal. Just some random shorter notes mostly in C++ since that's where I mostly run into the "how on earth does this work" problem lol

#

I did write quite a lot on some webdev topics in the past including a video course, but that was years ago

uneven cloud
#

I could make some tutorials on how to debug AI and just paste them here when people have questions.

#

Hahaha

misty wharf
#

Yeah I kinda wrote a few notes based on stuff people were asking about

#

It works because it's often what people will google about also

harsh storm
misty wharf
#

My brilliant strategy is if I ever make a plugin I'll use my docs page to advertise it

#

You search for how do I sort the details panel categories? Sure here's how you do it.. or just get this plugin

grim rivet
#

Hi ! how could i move my ai to an actor without all my different AI's going to the same point location ? I tried using radius but i want them to stand around the actor not far away from it

#

my guys are just standing behind eachother waiting to get a hit 😅

grim rivet
harsh storm
#

Search for Luthage's messages about this

lone socket
#

I have been banging my head the all day but can't find the reason why,

  1. I created a AiController with a Pawn
  2. added AIPerception component (Setup the necessary Sense).
  3. Added Stimuli to my PlayerPawn with Sight Sens configuration, and register the stimuli on Possess
  4. Added in GameIni
    [/Script/AIModule.AISense_Sight]
    bAutoRegisterAllPawnsAsSources=false

But for whatever reason the Player Pawn is not detected at all by the Sight. From my understanding the engine is using LineOfSightTo, so I tried on my side that function it's always returning false could it be the reason and why is that the case?

Thank you for the help!

uneven cloud
uneven cloud
uneven cloud
lone socket
#

I checked to detect anything

dense owl
#

I’ve never had to manually register a stimuli source before

uneven cloud
lone socket
#

(I ended up doing my own Sphere Collision Trace for Visibility and worked) But still want to use the engine style

uneven cloud
dense owl
#

Maybe cause I use mostly characters tho

lone socket
#

This one is detecting well my Pawn

uneven cloud
dense owl
lone socket
#

I did that since My character is possessing a Ship pawn didn't want the enemy Pawn to detect the character but the ship

dense owl
#

Can you not add the stimuli source as a component at runtime or does the engine frown upon that

lone socket
#

I can try that

#

Not sure you can
Cannot construct objects of type '/Script/AIModule.AIPerceptionStimuliSourceComponent' in Construct Object from Class

#

I guess a custom Sphere Collision will do^^

uneven cloud
lone socket
#

My sight was 360 degree at the end

#

since it's a ship X)

uneven cloud
#

Line of sight is still a line

lone socket
#

But yeah still weird it's not detected

#

maybe the view point is too low?

uneven cloud
#

I'd do a debug line from the NPCs view point to the target's location

lone socket
#

Will Try that thank you

uneven cloud
#

It could be the view point or the target's location is weird.

lone socket
#

oh I understood

#

it's blocked by my water component

#

first

#

as the line of sight is under water

#

Thx a lot for the himt!

#

hint*

mild bobcat
#

I also need to register things like forgetting in the game ini right?

#

why is that

#

AIPerceptionSystem.bForgetStaleActors

open swift
#

this seems like a dumb question but i can't really seem to find a straight answer: are decorators, tasks, services, etc. instanced per controller/behavior tree? As in, can I cache things in them and expect them to be specific to the actor running them?

mild bobcat
open swift
#

okay, and the other half of that question, do the nodes persist for the duration of the behavior tree? Just trying to do something simple like the first time a decorator evaluates, it gets a component on the actor and checks a value, and on subsequent evaluations it already has the component cached

mild bobcat
open swift
#

i really wanted to avoid blackboards as much as possible (I'm basically just going to be copying a million variables that already have multicast delegates tied to their values changing into another location that does the same thing???), but it seems like variables set inside of decorators don't persist, and there's no real event-based way to make them if you don't use blackboard keys from what I can tell (if you don't have a blackboard key selector as a variable, abort behavior is dependent on checking the condition on tick...)

dense owl
#

I see so much wrong here lol, but we’ll see what Luthage says 🍿

uneven cloud
open swift
#

is there a way to call abort functionality from a decorator at an arbitrary time in c++? like if i bind to a delegate on a component im passed in, can i call abort self when that event fires?

uneven cloud
open swift
#

essentially on the first evaluation of the decorator, save off a component reference on the owning actor -> bind to an event on that component -> when condition check is called just check that component's value but also if the event i bound to fires off i can manually abort self/subtree if needed

#

that seems like it makes sense to me but does not seem to be the way these are intended to be set up

uneven cloud
open swift
#

okay, guess ill just have to go steal the code for aborting on blackboard events

#

i feel like im missing the purpose of the blackboard at all to be honest, why would i want to store my variables i care about in an additional place?

#

like if health percentage, combat status, cc status, distance to target, number of targets, etc. can all play a role in behavior, and i have those things calculated for other uses already, what is the advantage of also setting blackboard keys for all of those things

uneven cloud
#

Blackboard has a lot of uses. Say you have a service that is updating your target. How do you get the target to the tasks for attacking? You store it in the blackboard.

#

You don't need to store all of your data there and frankly you shouldn't, but there's a lot of use cases.

open swift
#

right, but i already have a threat component that handles the npc's threat table and has valid targets ranked by threat. why do i need to store that in a blackboard as well, when in my mind just binding to the threat component's information would be more straightforward

#

not trying to argue they aren't useful, i just dont understand the use cases

uneven cloud
#

Because that's unnecessarily complex for targeting for most games.

open swift
#

ah, i play way too much wow so a lot of the targeting side of things is very RPG-inspired

harsh storm
#

You can do your targeting filter on your component. Just pass the selected target to the blackboard.

uneven cloud
#

I work on AAA games, including RPGs and the EQS is more than enough.

harsh storm
#

Doing an EQS query for target selection is also good.

open swift
#

well i wrote it because i wanted support for taunts/fixate/threat modifiers on abilities, etc.

#

but thats just one specific example not really the main question

uneven cloud
#

My EQS targeting also does that

open swift
#

interesting, i havent looked into EQS much but i thought it was mostly about querying the environment

harsh storm
#

That's what you should blog about Luthage. All the cool stuff you can do with EQS 😅

uneven cloud
#

Nah. There's a built-in generator to get the perception targets. Then you run tests on them and score/filter them.

uneven cloud
harsh storm
#

You have.

open swift
#

i work in an indie studio and our targeting logic is in 12 different places in some godforsaken 4k line state machine, so im just looking for an alternative to THAT for my own game lol but behavior trees are not super intuitive to me

harsh storm
#

Oh jeebus - that sounds like a nightmare

open swift
#

its terrifying

#

breaks every week lmao

uneven cloud
#

Our targeting is in a handful of env queries and never breaks.

#

Our threat is handled by a threat perception sense.

harsh storm
#

Luthage loves the EQS stuff. She got me using it and liking it more as well. Can do some cool stuff with it.

#

I haven't written a custom perception sense yet though

uneven cloud
#

We use it for so much, but it's time sliced so it doesn't hurt perf

open swift
#

per my questions about decorators binding to external events: so it looks like i set up references and bind to relevant events inside of OnBecomeRelevant (and unbind in OnCeaseRelevant), and then in my callback function I just need to call ConditionalFlowAbort, which triggers the behavior tree to check the decorator's condition again?

mild bobcat
#

is this right?
[/Script/AIModule.AIPerceptionComponent]
bForgetStaleActors=true
I couldn't find any documentation on how to actually set it in the DefaultGame.ini right so I just tried to base it off how the

misty wharf
raw tundra
#

My AI isn't using the navmesh. They keep getting stuck on on stuff. (The stuff makes holes in the navmesh, so it's not that.)
I can't figure out why...
My player character uses the navmesh just fine. So the navmesh itself is healthy.
Any ideas on what I might be missing?

misty wharf
#

Ugh I wish they would have thought about composability with AI Tasks a bit more

#

MoveTo in of itself is a good AITask, but what if I want an AI Task which moves but for example retries the move if it fails or includes some other logic? GameplayTasks itself supports having a child task, but the way AITasks are constructed they for some reason hid this part of it

#

So now I'm copypasting the entire 300'ish lines of code for MoveTo whenever I need it behave slightly differently

misty wharf
#

AI Tasks, not BT Tasks

spring inlet
#

ah nvm

#

why do you not make an ai task which launches the move to task?

#

and if it fails it launches it again

misty wharf
#

Well yeah that's the idea but managing it is more complicated than it has to be as a result of how it's been designed

#

GameplayTasks support a "task owner" which can be another gameplay task, so this makes it easy to compose them as you just pass your task as the owner of the child task

#

AITasks also support this in theory because they inherit from UGameplayTask, but as said, for some reason they've made it so that it doesn't let you set it up in that way

misty wharf
#

Oh yeah, and to add to it... They have delegates on AITask_MoveTo which let you monitor the task process which would be ideal for this scenario also.

#

But guess what they made them protected because screw you lol

#

AITasks are obviously mostly intended to be called from BP's, but considering how much plumbing you need to handle it, I'm not sure how this is intended to be used for building your own movement logic

#

@uneven cloud btw are you familiar with FAIMessage / FAIMessageObserver? Do you reckon these features are actually used for anything? It kinda looks like no since as far as I can tell there's only some really rudimentary support for them in BT's

winged cargo
#

Do anyone have any helpful info on making ai teams

misty wharf
#

That's a very vague question. Is there something specific with that that you need help with?

simple abyss
#

hey guys, so i am having some trouble setting up doors for AI. Some doors are initially closed and can be opened by the player, therefore i wanted to use a smart link that can be triggered by setsmartlinkenabled (in theory). I have added this smart link proxy via a child actor to the door bp. however this smart link of the child bp actor never actually seems to work. regardless of the settings. When i place a nav link proxy with the same settings in the world, it works fine and i can also enable/disable the smart link via the level bp without any problems. any ideas why the child actor here doesn't work properly?

steady phoenix
#

Does anyone know why my navmesh stops generating after a certain amount? this used to cover entire map, Tried a single bounds as well as multiple small ones, but it always stops at this radius, I've tried resetting my Nav Mesh settings but i might have changed something somewhere else.

steady phoenix
#

I managed to fix the above by reverting the git changes, still not sure which specific option has caused it, gone through most but can't replicate 😢

uneven cloud
uneven cloud
uneven cloud
uneven cloud
raw tundra
misty wharf
simple abyss
uneven cloud
misty wharf
#

Ah

uneven cloud
#

Plus it was a pain to hook into outside of the BT.

uneven cloud
uneven cloud
raw tundra
# uneven cloud Well ... What is it doing? What type of debugging have you tried?

The issue isn't debugging. They're just acting as if there is no navmesh. So they're running against trees and rocks, instead of running around them.
The issue is that I don't have a good overview over all the parts needed to make an AIController character use the navmesh.
I'll probably have to watch some more tutorials. It's probably some small thing, like a checkbox somewhere I've missed. Or a component I haven't added.

uneven cloud
raw tundra
mortal bay
#

I want my enemy to lunge if they're within 5-7m of target. Does anyone have tips for implementing a running check so that the enemy could perform a behavior when they're within a certain distance?

raw tundra
# uneven cloud The AI with Blueprints course on the learning library is better than any tutoria...

I think my problem has something to do with AgentRadius for the navmesh. Which is, of course, a buggy system.
My AI's capsule radius is 120, and the default agentRadius is like 34. So it would make sense that they get stuck on things. For some reason, they stop moving altogether when I set either the RecastNavMesh(known to be buggy) or the Supported Agents to 120. So I gotta figure out why that is. But it seems I have a lead.
I don't expect you to do anything about this, just thought maybe you'd find it interesting.

raw tundra
#

There are multiple versions, depending on your preference.

#

I use it for spotting a target to chase, then updating the blackboard with the chase target. The Behaviour Tree uses decorators to switch between MoveTos. So, in your case, you could add a "LungeTarget" to the blackboard and have a decorator keep an eye on that. Something along those lines.
But I bet there are many ways to do it. I'm no expert.

mild bobcat
#

Any particular reason why when I have the AI set focus, it'll face the player character in all dimensions, but when I set focus to a different actor, it does not use pitch?

uneven cloud
raw tundra
#

Not all the values though. Worth mentioning. It may be just the AgentRadius.

uneven cloud
#

You shouldn't be changing the recast. You change it via the supported agents. Sometimes you then need to delete the recast actor and rebuild.

uneven cloud
raw tundra
# uneven cloud You shouldn't be changing the recast. You change it via the supported agents. ...

Here's the reported issue: https://forums.unrealengine.com/t/recast-navmesh-does-not-save-when-editing-properties/299859/13
And the workaround: https://www.youtube.com/watch?v=8wuerMwu6fI
If you're interested. It's ancient, apparently.

In this video I adjust the agent radius for the navigation mesh in order to tighten the borders around the environment so that our AI can navigate more effectively.

kw: navmesh moveto stopped stuck

Please subscribe if you enjoy the content!
I am a new channel and could use all the help I can get, thanks!

▶ Play video
mortal bay
uneven cloud
mortal bay
raw tundra
uneven cloud
mortal bay
uneven cloud
#

Every time your character moves, that collision component also needs to move and then does a collision sweep.

uneven cloud
mortal bay
uneven cloud
#

You're welcome.

mild bobcat
modest token
#

why is my Ai only able to pathfind to the players location if the player is touching the ground? if the player stays in the air like jumping of a ledge for more than 0.25 seconds the enemies stop since the player isnt in a valid spot in the navmesh since the player is in the air. how do i fix this?

dense owl
dense owl
#

You could cache the last location on jump or use traces or a number of other things, but otherwise, for you to path to something it generally needs to be on the navmesh

mild bobcat
open swift
#

alright so i made a decorator in c++ that sets a timer when the node is instanced and tries to call a conditional abort when the timer finishes just to test things out. However, the behavior tree component that's passed into OnInstanceCreated is not valid when the timer fires off (I pass it as a weak object ptr to the timer). Any idea why this is the case?

uneven cloud
uneven cloud
open swift
#

yes and yes

#

and im still running the bt when the timer finishes as well, so it shouldnt have changed

stiff gale
#

When I'm using SmartObject, how do I check if an object is claimed? If I place three with two smart objects, the the 3rd ai still finds one

dense owl
#

I guess as long as the origin pawn/char is on the mesh itself

uneven cloud
dense owl
#

But it wouldn’t work in a game where everything is floating because your origin needs to actually be on the mesh right?

uneven cloud
#

Well it works the same regardless of what you are projecting. If you have a hovering NPC that is above the nav mesh, extending how far you project down will still pass the project to nav mesh test.

dense owl
#

Like a strategy game with flying ships

#

Ik we had a convo about that before

uneven cloud
#

Nothing needs to be ON the nav mesh. It just needs to be able to project the location onto it. In fact the actor location is generally in the center of the capsule, so it's never actually on it.

dense owl
#

Oh, interesting. So you could do that too just by increasing the projection extent? Nice

uneven cloud
#

Why wouldn't it work? I've said this several times that changing the projection amount does work. Hovering for something like a ship isn't a good way to do it, but it is a way.

dense owl
uneven cloud
#

If you have a simple enemy in a mostly open space, it's a common way to do it. It's not going to look the best and might have some issues, but lots of games do it.

dense owl
#

This is good info thx

open swift
#

any best practices for what to store or not store in node memory (and instance the node instead)? saw someone mention not to store TArrays in there

raw tundra
#

So, I ran this command in windows cmd, because it told me to when I changed some agent radius stuff. Things work now, AI does what it's supposed to, so that's great.
But when I ran it, it did so in a seperate command line window, I saw some red lines, but it closed immediately. Is there a way to view the results of that commandlet? You know, in case there were any errors I should be aware of.

urban lake
#

Anyone had this issue with behavior tree not working from begin play?

#

This is the setup in the enemy BP, works on another map but for some reason not this one

raw tundra
urban lake
#

"spawn actor from class"

raw tundra
#

Try adding Spawn Default Controller

urban lake
#

Still getting the same error

#

I saw theres a "spawn ai from class" have you used that before?

raw tundra
#

Because Spawn Default Controller adds that one.

urban lake
#

Yeah I got that one checked.

raw tundra
# urban lake Yeah I got that one checked.

Ok, so I'm running the Behaviour Tree on On Possess in my AIController blueprint. I'm guessing your actor has not had time to be possessed yet on BeginPlay, so maybe that's why you're having issues.

#

There's Possessed event if your AI pawn is a character. Maybe you could use that if you don't want to add your own AIController.

urban lake
raw tundra
# urban lake ah ok. How do you get that node?

I made my own blueprint "AI_BasicEnemy" that inherits from AIController, and I use that as the controller for the enemy pawn. AIController has an On Possess event.
Try just searching for possess, you may be able to do it from your pawn. But I'm not sure it exists there.

#

Character seems to have one. Though I haven't tried it.

urban lake
#

Thanks very much for all the help

raw tundra
urban lake
uneven cloud
still musk
open swift
#

I asked this last night but it was super late so im not sure anyone saw it: Is it okay to store things like TArrays, UObject pointers, structs like timer handles, etc. in node memory? Is there anything that needs to be done to clean these up besides emptying them/setting them to nullptr in CleanupMemory?

uneven cloud
open swift
#

Thanks I'll look into it. I was testing different ways to accomplish the same thing, so still just working on a decorator that essentially just returns false for x amount of time then starts returning true, but without being evaluated on tick. So basically the node just sets a timer on InitializeMemory and stores the handle in the node memory. The timer then goes off, calling a function on the node memory struct and calls ConditionalFlowAbort (though I'm not sure yet what the difference between this and RequestExecution is), but I need access to the behavior tree component for that specific node, which I'm also storing in node memory. I accomplished this with an instanced node super easily but doing it with non-instanced nodes seems like im just abusing node memory more than its supposed to be

uneven cloud
uneven cloud
#

Why was everything deleted?

harsh storm
#

Maybe mod didn't like the mood?

potent iris
#

Didn't feel right keeping a massive back and forth argument here, it's disruptive to the channel

open swift
#

okay so my decorator works now except when i set its abort behavior to self, it still aborts a lower priority node and i dont know why. I'm calling ConditionalFlowAbort when the decorator's condition changes, which looks like it is respecting the observer abort behavior (at least it seems to check it), but then it just aborts the lower priority node anyway. For reference my behavior tree is literally just a selector with 2 wait tasks, the left one has a decorator and the right one doesn't. The right one is getting aborted when the decorator on the left one evaluates to true, even though the decorator is set to abort self

#

if a visual is better

north prism
#

I want to make service to check if the AI can see the player , is the above blueprint any good for that, I am new and just started learning UE this month

dense owl
open swift
#

the lower priority node would be the one on the right wouldnt it?

#

so it shouldn't abort that right node when the decorator becomes true on the left node

dense owl
#

Yeah no I misread that lol

#

Is the right Wait not firing then?

open swift
#

it is, but as soon as the left decorator becomes true it aborts the right wait and runs the left wait instead

#

when it should be waiting for the right wait to finish before switching

#

i think its because youre not supposed to call ConditionalFlowAbort when a node is not active, because explicitly checking for that seems to fix it, but it is a bit annoying that that isn't just checked automatically inside the abort function (when it is already checking whether the branch is active anyway)

dense owl
#

If you want the right branch to go off as well you need a sequence

gusty jetty
#

Hey everyone, is there anyway to generate a navmesh on a moving platform?
I'm working on a space game and I'd like NPCs to be able to walk around on a flyable ship...

paper sparrow
#

Using a world partitioned map, do you 'Need' to select the 'IsWorldPartitionedMesh' on the RecastNavMesh? I've been having some issues and on my world partitioned map, everything seems to work fine with this option disabled

mild bobcat
gray prawn
#

has anybody ever had this problem where the ai's model interferes with the nav mesh bounds? It's being treated like a piece of terrain for some reason

#

would I have to change the model to a skeletal mesh?

misty wharf
#

Turn off can affect navigation on its primitive components

modest token
#

why does my navlink proxy never fires the Receive Smart Link Reached event even if the enemy looks like it reached the link?

#

i made the event print hello but it never does and i dont know why

uneven cloud
modest token
#

how do i set up the smart link then?

uneven cloud
#

Remove the point link

modest token
#

i remove the point link before but it didnt work still

#

alright nvm i got it to work somehow

#

before i turned on make smart link relevant but that didnt work but now it does

ivory nebula
#

Hey guys, is there a way to auto enable this debug view when hit play? Without pressing the tilde and "Num 5" every time

ebon flower
#

Hey, is there a way to check if an AI controlled character has stopped seeing their target without changing the max age of the sight in their AI Perception?

open swift
#

How would you guys handle two enemies that have the same basic behavior (try to run into x range of their target, then use an ability from a prio list) but different abilities or different ability priorities? I'm assuming that making a 2nd behavior tree that's almost identical to the first one is probably not the way you're supposed to do that. Would you have a dynamic subtree that you run in the "choose ability" part of the tree? Have a blackboard key that points to an object that has a list of abilities the actor can use (that feels hacky since i dont think you can just put an array in a blackboard key by itself)?

uneven cloud
open swift
#

how would you pass the npc's ability options to that task

#

oh

#

eqs i guess

#

not sure how to set that up to do that

uneven cloud
#

If you are using GAS, you can get all of the abilities, call the function CanUseAbility and have whatever other data on the ability you want to use.

open swift
#

i am not using gas, but specifically i would only like to pick from a subset of abilities in a task (in this example, specifically the melee range abilities, the mob might also have some abilities it uses if it cant reach)

#

if i could use arrays as blackboard keys i could pass them in that way

#

but maybe i just have a component with tags for abilities and pick by tag?

uneven cloud
#

To use the EQS, you need to make a new item type. But like I said, you don't actually have to use it. Just get all your abilities and run tests on them.

#

Why does it need to be on the blackboard? That sounds wasteful.

open swift
#

im just not sure how else to change what values im passing in on an instance-to-instance basis other than setting them on another component somewhere and then just checking that component

uneven cloud
#

Your pawn should know what abilities it can do. You just need a way to get them.

open swift
#

like if my mob has 5 abilities, i want to have a task that is basically "pick from your melee abilities," which would be 3 of those 5. just trying to figure out the best way for the task to ask whatever pawn its on what abilities it would like to consider its melee abilities, i could make it inherent to the abilities themselves but mostly i just want to be able to have an arbitrary list of abilities on a task that it picks from

#

but also have that list be editable per pawn, not per behavior tree

#

not sure if im explaining what im trying to do very well

#

sorry about that

uneven cloud
#

You don't want to have them on the task. It doesn't make any sense for the AI to own those abilities.

#

You are explaining it fine. I'm trying to tell you that you are approaching it from the wrong direction. The PAWN should handle the abilities. The AI asks the pawn for what abilities it has and then picks the right one to do.

open swift
#

the pawn has all the abilities, and knows what abilities it can do, the behavior tree is just where i would be categorizing what abilities fit into which situations

uneven cloud
#

Do you really need to say "pick a melee ability" or is it better to do "out of the abilities you can do, which one should you do if the target is X distance away"? The 2nd one makes for a cleaner BT and more flexibility.

open swift
#

so your task is basically just scoring all possible abilities given whatever context?

uneven cloud
#

If each ability has conditions that must be met to execute, such as distance and line of sight, and a priority then you can easily make a BT task to just pick the best one.

#

Then you can add more abilities without ever touching the AI.

open swift
#

so you wouldnt really handle ability priority in the behavior tree at all then, its all external?

#

(aside from just asking it to get the best one at the point where its time to use an ability)

uneven cloud
#

Yeah. Putting ability selection into a BT makes a really messy BT.

open swift
#

okay interesting. having a visual layout for ability priority was kind of one of the main reasons i was even interested in learning behavior trees, my system before was basically just an array of structs full of conditions and ability classes, but it was kind of a pain to edit

uneven cloud
#

You also can't reuse the BT if you put ability selection in it. All the BT really needs to do is Find an Ability and Execute Ability

open swift
#

makes sense that you just kind of dont lol

uneven cloud
#

Finding an ability also doesn't really work well with the tree structure. It's much better to use Utility - where all abilities are scored and then the best one is selected

#

I'm working on a game with hundreds of different creatures. We have 3 combat BTs. Because the ability selection is handled this way.

open swift
#

my initial instinct (instead of scoring) was to basically create this as a data structure (this is just a random WoW rotation guide) where you just have a ranked list of abilities, which can be in the array* multiple times, and associated conditions for casting them

#

do you think scoring is more straightforward and flexible? with no experience in doing that i kind of assumed it could get messy with a lot of abilities, but again thats just an assumption having never implemented it

uneven cloud
#

I think scoring is cleaner. It's also a lot more flexible.

#

If you do good debugging with the visual logger, it really doesn't get messy.

open swift
#

alright, i will keep that in mind. i do have another question with the setup of just selecting an ability: how do you deal with abilities that require a certain condition to be usable? You would eventually want a monster to use that ability but would need to force them to meet those conditions first, so do you score BEFORE checking whether something is usable, and then find out what conditions to fulfill to use that ability?

#

essentially with the super basic approach i was testing i have abilities that can be used in melee and abilities that can be used at range, but if the target is always in melee they'll never use the ranged ability, so something would need to force them to run away first to use that ability instead of just continually using the melee abilities, for instance

uneven cloud
#

For my ability selection I have them find an ability, get into range and then execute the ability. I don't think running away feels good from a player perspective, so they dodge instead.

#

What that means is that dodging has a high cool down, but also a high priority.

open swift
#

okay, i think i need to make a distinction in my ability system between "ability can't be used because of cooldown/global cooldown/cc/lockout/etc." and "ability can't be used because of an arbitrary ability-specific condition like range" so that i still score abilities that can't be used because of stuff that can be fixed by movement

uneven cloud
#

They will also prioritize abilities they can do right now over ones they have to move into range for.

open swift
#

thanks for your help, gonna go test all this stuff out and see what i can come up with

uneven cloud
#

You're welcome

hearty niche
#

Where is this option in UE5?

quaint wedge
hearty niche
#

Can you highlight it?

quaint wedge
gusty trellis
#

any ressource to learn how to use smart object correctly ?

harsh storm
#

Honestly - after reading people's experience, I'd just roll my own. It'd probably be easier/better in the long run.

#

The concept of a SO is pretty straight forward.

spring inlet
#

currently smart objects are rather meh than good

#

and as Duroxxigar said the concept is rather simple, idk how large your game has to be to take advantage of the caching that epic implemented (which on the other hand seems to be the root cause that smart objects still can't move until 5.4)

trail spindle
#

I am having a LOT of problems trying to get multiple actors to walk through a door without them getting stuck on each other like its a housefire.

#

I've tried RVO and Crowd Manager without much success but I'm new to both of them. Can anyone point me in a direction?

misty wharf
#

If it's not a very wide door this can be complicated because you'd need them somehow intelligently not try going through the door while someone else is within the doorway

#

This could be done by making the door a smart nav link which can handle the queuing of npc's through it, but it would be significantly easier to just allow your npc's to overlap

gusty trellis
fossil cobalt
#

Is it possible to increase the radius for nav link proxies? I've got a setup that works great for launching 1-2 AI actors from point A to point B, but any more than that and it bottlenecks:

#

I found the snap radius setting but it seems to only be available for simple links..

dense owl
fossil cobalt
#

even with 4 or 5 they bottleneck every now and then

#

maybe less frequently but enough to be an issue

#

the documentation of nav link proxies is next to nonexistent lol

raw tundra
#

Any clue why navmesh stops working once the game is packaged?

ocean wren
# fossil cobalt Yeah I've set up two, I wonder if more is just better

My advice is to roll your own queing mechanisms. Doors are quite tricky, but if you write the code well, you can generalize to ladders, elevators, escalators, vehicles etc. Basically shift some coordinating logic into the door (a smart object if you will, I use my own SO component for it). I used a similar thing for squad control for door breaching and room clearing and it works well.

#

Its essentially using resource locking and/or some kind of usage token schema

#

Also dont forget to create debug visualizers and the like. It really helps.

fossil cobalt
#

when they're not grouped up, it all works great

ocean wren
#

Well, you're trying to fit a lot of people through a small opening. So you have to control who is currently using the opening right? You have to deal with people coming from both sides. You have to control who has priority. Those are all general coordination aspects

#

Personally, I switched off all agent-agent collision and use soft seperation instead.. so that you don't get that very obvious capsule collision stuff

#

My agents had to play coordination animations for stuff like grabbing the door handle and opening the door, or setting breaching charges, or using a breaching device/gun or using a mirror etc.. so a bit special case, but still.

fossil cobalt
#

I don't know if turning off enemy to enemy collision would make sense as a whole for this game but maybe allowing them to slip by each other more than they currently do would be good

#

not sure how to do that

#

here's an example of it happening

#

ignore my buddy in the background lol

ocean wren
#

So what I do, is just change the collision on the capsule to ignore other capsule as collision, you can do it in the capsule collision settings

#

now if you only do that, they can pass through each other.. which is fine to stop things funnelling, but looks weird

mild bobcat
#

So not in general but just for that case

fossil cobalt
ocean wren
#

so you then add a pass that pushes them apart from each other, using a simple steering force like thing. I do it in the detour crowd update

fossil cobalt
#

I don't suppose there's a "is navigating to nav link" type boolean I can use

fossil cobalt
#

how do? lol

ocean wren
#

Basically, look at how TF2 does collisions between player.. its basically just a force that forces them apart from each other.. super simple

#

scales to a higher force the more they overlap

#

its a steering force called seperation if you want a search term

fossil cobalt
#

yeah that sounds ideal

fossil cobalt
mild bobcat
fossil cobalt
#

yeah

ocean wren
#

You could turn off collision and just handle the pushing on overlap I guess

#

I did mine as part of the detour crowd movement steering force.. so you can do some funky shoving of crowds

mild bobcat
#

someone more experienced may be able to tell you how to extract navlink specifics from the path/navmesh but it's hard to say, depending on how tightly packed the bottlenecks are. LIke if they get bottlenecked 2 navpoints before, then you have to account for that, etc...

fossil cobalt
#

😵‍💫

ocean wren
#

We had squads moving around a map.. did some small random offsets from each nav path point so that each squadmember didn't try and converge on a single point.. can help a lot

#

I think the navlinks stuff needs C++? I did it in C++ anyway, but I don't know if it was all exposed to BP

#

Maybe someone's tried it recently

fossil cobalt
#

Yeah I wouldn't be surprised if it needed C++

fossil cobalt
#

it's a bit of a bandaid for now, definitely the separation force would be a lot cleaner

ocean wren
#

If you ever try it, do add some kind of priority ordering so that agents can push past other ones

fossil cobalt
ocean wren
#

No, but you can maybe look up some things on steering behaviours. I think there was some discussion of it in Game AI Pro books that are available openly now

#

There's always Craig Reynolds original site.. but the Game AI Pro is probably a bit easier to understand for implementation

raw tundra
#

"LogNavigation: Warning: NavData RegistrationFailed_AgentNotValid, NavData instance contains navmesh that doesn't support any of expected agent types."
I don't get it. It supports all three? No?

celest python
#

hi zoom ChillBar_wave

#

you werent around since a while

ocean wren
#

Too busy with shit 🙂

#

going to have a bit more me time this semester thankfully

#

I was literally spending every weekend making videos for various classes

#

Hows things?

#

I've decided to become an ultra capitalist and try and cobble together some tech to make big $$ 🙂

ocean wren
#

Or just rob a bank I guess

uneven cloud
fossil cobalt
#

the point is too small

uneven cloud
fossil cobalt
#

the use case is generally limited to just one AI

#

I understand that it doesn't support regions, it should

uneven cloud
fossil cobalt
#

but I spread them out a bit

uneven cloud
mortal bay
#

How can I prevent an AI Perception system from updating for actors of the same type?

uneven cloud
#

By using the team interface functionality

trail spindle
mortal bay
#

Is anyone aware of good documentation for the enemies/neutrals/friendlies functionality in the AIPerception component?

mortal bay
dense owl
dense owl
#

Ty

misty wharf
#

Hmm it just occurs to me the Custom TeamID enum page isn't being linked correctly from that page 🤔 wonder what's up with that...

#

Ah yes. Turns out Quartz which I use to generate that site is case-sensitive, while Obsidian itself is case-insensitive

raw tundra
misty wharf
#

Are you using level streaming?

#

I've seen folks have issues with that when the navmesh volume is in the streamed level or some other configuration like that... besides this, only thing I can think of is you might need to delete your recast navmesh actor (it stores the actual navmesh data) and regenerate it (Build -> Build Paths)

rose drift
#

Greetings!

Can somebody explain how I can place NavMeshBoundVolume in procedurar generated map?

Because we cant place them during runtime, but the dungeon (map) is generating during runtime. So I can't just place volume in every generation room

raw tundra
# misty wharf Are you using level streaming?

No. But I am using servertravel to go from the main menu level to the actual game level. Not sure if that matters.
I have deleted the navmesh recasts many times. It makes one for each agent. Doesn't seem to make a difference.

raw tundra
misty wharf
#

Oh that's good then :)

rose drift
#

Yo, anybody knows something about AI navigation optimization?

Is nav invoker a really good solution against "just place big navmesh bound for generated level"

gusty trellis
#

Hey guys i have 2 zone as bp that i want to get the transform and feed it in the blackboard to use it in thebehaviour tree how ?

Im mostly asking to understand the way u would communicate that data from those bp to the ai controller

misty wharf
#

You need to get a reference to the object you want in some fashion

#

If it's a specific actor type, using get actor of class could be acceptable as long as you are aware of its potential issues (eg. if you place another actor of that type and so on)

#

If you have more than one of them or it's just otherwise not a good solution for you, you could try to identify the actor by tag, or have the actor register itself somewhere like the game state or a subsystem

#

You can then use that registry in your AI controller to pull the actor from it

gusty trellis
#

thx, but then nothing as to be casted or communicate via interface or ed its just getting a reference ? cause casting isn't getting a reference ?
casting is reserved to get an entire class ? here we just want to reference on object is that right ? @misty wharf

misty wharf
#

Casting effectively says "convert this value into this different type if it's possible". It doesn't get anything

gusty trellis
gusty trellis
misty wharf
#

Thanks :) That's nice to hear

celest python
rose drift
#

Yo, anybody knows something about AI navigation optimization?

Is nav invoker a really good solution against "just place big navmesh bound for generated level"

quaint wedge
#

Does anyone know if it's possible to make AIs 'walk' underwater ?
I mean, walking on NavMesh even if the AI Actor is in a water volume

mortal prawn
#

hi, I'm writing an essay on how generative AI will affect the games industry for artists. I would love to know anyones thoughts on the subject?

harsh storm
#

(I don't know the rules for #generative-ai - so make sure to double check)

trail spindle
#

Using an evironment query, I'm trying to score each point by its "navigable" distance, instead of it's vector distance from the origin. There's a test called Pathfinding but it only returns a bool for whether it's navigable, not its distance.

#

Or do I have to settle for whether the point is visible from the origin.

misty wharf
#

You could potentially create a custom test that does this. I think you can get the full path to the target point and then measure its length. Do note that this is more expensive to compute than just the regular pathfinding test

uneven cloud
rose drift
uneven cloud
uneven cloud
rose drift
#

Strange, because Invokers cast NavMesh only around NPC, and "just NavMeshBound" cast on all generated map

trail spindle
rose drift
#

No, of course I like this solution ( "just NavMeshBound" without invoker), because with invokers I need to do some additional logic in behevior tree, but that very strange

uneven cloud
#

"just NavMeshBound" is not a thing.

rose drift
uneven cloud
#

You have static, regen modifiers only, full regen or invokers.

rose drift
#

I think "dynamic" its full regen?

uneven cloud
rose drift
#

Not sure, because without NavMeshBoundsVolume I didnt have any navigation pathes

leaden frigate
#

@uneven cloud sorry to jump in with an ask, but do you think you could provide opposing usecases for using a generated nav mesh vs invoker components?

#

("I don't have time" is a fine answer, just thought it could shed some light)

uneven cloud
rose drift
dense owl
#

Sending love from the front lines. Full stop 🙃

uneven cloud
#

Haha

rose drift
#

But why people use invokers?

uneven cloud
#

Because UE didn't always have navigation streaming and people making tutorials don't know what they are doing.

leaden frigate
uneven cloud
#

Pretty much. They haven't been updated in years.

rose drift
leaden frigate
#

Ok, that's good to know. I was considering them as a way to mitigate spaces between nav meshes, but I assume there's a more performant way.

rose drift
#

Or I don't need optimize navigation?

leaden frigate
#

Is your navigation causing you performance problems?

#

I know I've undermined my own position by not knowing about invokers, but as a general rule "if it's not broken, don't fix it"

#

Focus on optimizing the parts of your game that are slowing your game down

rose drift
dense owl
#

Or in modern terms, premature optimization is a bad idea

rose drift
#

Agreed

uneven cloud
#

Premature optimization is bad, but so is knowingly doing something incredibly expensive.

rose drift
#

Why I cant place NavMeshBound inside blueprint?( Placing big Bound just in screne looks like terrible idea, but maybe its okay in industry

#

(my dungeon is genereted by rooms, rooms === blueprints)

uneven cloud
#

Programers use size squared for distance, because it's not worth the cost of the square root. That's not premature optimization, that's being educated and experienced.

uneven cloud
rose drift
#

okay, I got it, Thanks for advices)

#

You are best!

leaden frigate
#

I'm not at my development PC at the moment, but I'm curious: is it possible to set the extents of a dynamic navmesh volume during runtime to accomodate for changing worldspace?

#

Perhaps by setting extents and forcing an update?

uneven cloud
#

If your bounds are too big and covers empty space, it's not a big deal. Nav mesh just won't generate in the empty space.

leaden frigate
#

Will overlapping navmesh bounds allow an AI to cross from one to the other, or is that only handled through navlinks?

uneven cloud
#

Yes it will.

#

All the bounds do is signify that the nav mesh will be built within the bounds. They don't do anything else.

#

So if the nav mesh is generated with a path from point A in one bounds and point B is another, then there will be a path. The bounds actually doesn't matter.

leaden frigate
#

So for a modular sort of world (building by building, for example), would it make sense to have each piece include its own slightly oversized nav mesh bounds that then overlaps with others as pieces are loaded into the world? Or is it too expensive, with a better solution typically being to load in pieces to a large area with an existing nav mesh and regenerate it?

knotty tundra
#

has AI changed much since 4.27? is EQS still in beta?

trail spindle
#

Are clients allowed to run an environment query?

misty wharf
#

also it might have lost the beta label at some version of 5 but haven't really looked at that

uneven cloud
uneven cloud
#

There used to be a setting in the project settings for AI systems to be created on the client, but that changed with 5.

leaden frigate
wide robin
#

I'm trying to make a simple state tree with a random patrolling AI. The FindRandomLocation state has a task that has a Vector as an Output while the WalkToLocation has a Vector has an input. I'd like to bind the output of the FindRandomLocation to the WalkToLocation but, based on how the tree is set up now, I can't. The only way i've found to do so is to have both tasks on the same state. And even if I do so, the AI Move To failes with abort.
Am I missing something?

wide gull
#

Hi. I'm struggling with understanding the concept of Age in perception component.
Easiest to explain what I want to achieve.
I have a Tower that will fire on the enemy that comes within range (in this case Sight perception) . It will always shoot on the player that has been within the range the longest. If that steps out, I want to select/focus the enemy being within range for the longest again.
Now if I put MaxAge to 0 (zero) the Aging will not happen within range but only when it comes outside of range to remember where last seen.
If I put MaxAge to 0.1f it will constantly trigger a new perception update.
If putting it to 9999 it still doesnt increase within the range. Only outside.
Is there an age that is growing within the perception range? Should be as it is triggering a new update when Max Age is low. How do I get a hold of it?
Am I thinking about this the wrong way? (C++ or BP doesnt matter)

dense owl
#

Verbatim from the docs: Determines the duration in which the stimuli generated by this sense becomes forgotten (0 means never forgotten).

#

It doesn’t measure from when it was perceived but rather from when it stopped being perceived

wide gull
wise sluice
harsh storm
#

Just look up her messages about open world. Still favor nav mesh streaming.

wise sluice
wide robin
#

I'm trying to understand State Trees fully. Now I'm trying to implement a simple behavior where the AI goes to a objective

#

I get this error and, while I understand the error, I don't get the reason why there's no condition for the AI to enter the MoveToObjective state

#

Since I'm sure that the FindObjective task returns "true"

misty wharf
#

The State Tree attempts to always enter the leaf

#

So the Idle state would never be active without MoveToObjective being active

#

I don't know if it's related to the error message though, haven't seen that one

wide robin
#

Mmmh, okay, i think i understand the problem now. The MoveToObjective will never enter since the IsThereAnObjective variable is set with the FindObjective task

misty wharf
#

Also - since you have an enter condition on the leaf node which depends on the parent node, this will not work

wide robin
#

that is on the Idle state

misty wharf
#

If the leaf node's condition would be false when the parent state's task has not ran, the leaf node and the parent would never activate

wide robin
#

okay, now i understand

#

then in this case what would be the best (or one) way to implement this kind of behavior?

misty wharf
#

Someone was here a while ago who said that using different selection mode setting he got it working, but I've not tried that myself so I can't say for sure

#

Do note that this pattern may not work if your tasks which load data don't resolve immediately - in that case, you would need to have the "wait state" to actually wait for the data to become available before transitioning to the next state

wide robin
#

mmmh okay, that's clear

#

So in this case is probably better to have the info about the objective on the Blueprint of the AI and then use it through the tree

#

what it's confusing a bit for me (coming from behavior trees) is that it feels like the state trees don't have a place where to store and use data (like a Blackboard) but the data is spread in different places

#

because, using the evaluator to do so, feels demanding in terms of computing since you'd do it on tick

#

but i might have not understand a lot of things about State Trees :)

pine plinth
#

do you guys put the StateTree Components inside the controller or the pawn ?

queen vortex
#

how do i make navmesh generation avoid those boxes on the lower right? They have collision preset of PhysicsActor, since they are intended to tumble and be knocked around, but i want only the player to walk into them, and for enemies to avoid them. How?

wide robin
#

but i don't know if it's the best way to do it or not

pine plinth
wide robin
wide robin
queen vortex
# wide robin how is the "Can Affect Navigation" check set-up?

ah i didnt know that feature existed. Can ever... is not ticked. ticking it makes them be pathed around like i want
Would it be possible to make these boxes be ignored by enemies while they're intact, but become walkable and not block navigation once the player has bumped into them (at runtime during gameplay)?

wide robin
#

while before was true

queen vortex
#

seems like the sort of box you'd want to have toggled on for things that don't affect navigation but might later get changed to, also. like an authortime optimisation?

wide robin
#

at the end there's "Using the Runtime Generation (Dynamic)"

#

maybe that might help with what you need

queen vortex
#

very cool thank you!

#

one more related question, is there any way to randomise pathing a bit, so that agents choose an only -fairly efficient- path rather than machinelike precision on the minimal cost? To simulate more organic movement and prevent crowds from clumping up around corners and chokepoints

wide robin
#

never used though, i only know its existence

queen vortex
#

hmm no, i dont think avoidance is what i want. i dont mind if enemies jostle and shove each other around, i just want their movement to be less predictable

#

thank you for the links so far, im saving these for later, the first one has a lot of good stuff

glacial siren
#

hello i have an issue with my navmesh, i tried yo fix it by using Nav Link Proxy

#

but it only take the stairs to go downstair

queen vortex
glacial siren
#

i did it

queen vortex
#

this direction setting?

glacial siren
wide robin
glacial siren
#

i'll give it a try !

glacial siren
wide robin
#

should be in the project settings

glacial siren
#

ok

#

THANKS

wide robin
glacial siren
#

IA doesn't move anymore

wide robin
#

did you try to change one setting at a time? not sure why now it's not moving anymore

glacial siren
#

only agent

#

slope

wide robin
#

try to reset to the previous one and check if it works again

#

not sure why it's not working anyomore tbh

glacial siren
#

i rested it now i'll try redo only the AgentMaxSlope

#

they can go down but not up

#

but

#

they have the path

wide robin
#

have you tried to increase max step height also?

glacial siren
#

no

glacial siren
wide robin
#

this is how unreal explains it

glacial siren
#

i think i have collision issue too

wide robin
#

meaning it's the max height the character can step before needing to jump (i.e. with link proxy)

glacial siren
#

even with Max step high with 900 of value it does't climb

wide robin
#

seems like the navmesh it's not generated in a proper way though

#

how are the collision set on the stairs?

glacial siren
#

like this

dire jungle
#

navmesh/eqs question - how can i ensure that npc type A cannot walk over certain areas of the level, but other npcs can? Sort of like a navmesh obstacle but that is only recognized by A, while npc B C D etc can all walk over it freely

harsh storm
#

Nav filters

wide robin
#

Or Recast

#

i think

wide robin
# glacial siren

it's easier to understand how they are if you go in the object and check them

#

it's not really clear to me from this pic 😅

harsh storm
#

It's not like super great, but it goes over some neat things that most people aren't even aware of

uneven cloud
# wise sluice What about open world? 👀

Nav mesh streaming. Not invokers. Being an open world game doesn't change how expensive invokers are. In fact, with an open world game you need to consider performance even more than a typical hobbyist game.

uneven cloud
queen vortex
uneven cloud
# glacial siren they can go down but not up

You have to make the character movement component settings match the navigation settings. If you change the step height or max slope in one, you must change it for the other.

uneven cloud
queen vortex
#

hmm, well they make a path out of waypoints right? Perhaps i can interdict that and mess with the path before its followed, add some randomising to the waypoint locations?

uneven cloud
queen vortex
#

C++ is where i'm most comfortable!

harsh storm
#

Didn't Eren look at PostProcessPath and figure out it was fairly useless for this? 🤔

#

I can't remember.

dire jungle
uneven cloud
median socket
#

We did a game a while back where we instanced out tiles, and I remember we used invokers.

uneven cloud
median socket
#

Gotcha.

#

Yes, in that case I fell victim to the tutorial misinformation swamp for sure!

#

Thanks for the answer! Will be good to know if we ever revisit that game!

uneven cloud
#

I've worked on 2 games that had procedurally generated worlds. Both times we did performance testing with dynamic generation vs invokers and invokers are several times more expensive than dynamic generation

median socket
#

Huh! Indeed very good to know!

celest python
#

Because what you were asking for that day was happening inside of that function

#

But Luthage disagrees that its a good idea to do what you were asking there

ebon flower
#

Does anyone know if the Move To task overrides the actor's rotation? I made a service to make the character spin in place but it doesn't happen if the Move To is being called, even with Strafe on

misty wharf
#

iirc the path following component overrides the actor's "focus" which ends up having it face the direction it's moving to

ebon flower
#

Any work around that?

misty wharf
#

Not sure, I'd start by looking through the code for the path follower comp and hope there's something useful

ebon flower
#

Alright, I'll look there, thank you

ebon flower
#

Is it possible to have two different controllers with different behavior trees but the same blackboard? 🤔

misty wharf
#

Same as in shared or just the same type?

ebon flower
#

Shared

misty wharf
#

If you look in the BB editor, each BB key should have a checkbox for that

#

You'll have to enable it for all the properties you want to be shared

wide grove
#

I am doing a project where we manage a hotel, but customers come to the reception and tell us how many hours or days they will stay and whether we will accept them accordingly. In short, how to make hotel customer random NPCs, can you please help?

wide grove
mild bobcat
wide grove
wide grove
mild bobcat
#

Do you know how to trace and debug behAvior trees? F9?

uneven cloud
wide grove
#

Ok I did it and solved the problem

wide robin
#

Hello! I'm using the Visual Logger to check the activity of the State Tree my AI is using. Usually it's super helpful but now, when the AI is stuck, it just says "Could not trigger completion transition, jump back to start." with no reference to any of the states i'm using

#

Anyone has any idea on how to get more info? Understanding where it gets stuck and which of the state doesn't complete the transition?

misty wharf
#

Try looking at the previous logged messages

#

You can also try using the state tree debugger which should be in one of the menus when you're editing the tree

shadow dawn
#

Has anyone experienced a fatal error with state tree? I keep getting a random crash which has at the top of the stack trace
Assertion failed: IsValid() && IsValidIndex(Index) [File:D:\build\++UE5\Sync\Engine\Plugins\Experimental\StructUtils\Source\StructUtils\Public\InstancedStructContainer.h] [Line: 119]

#

I know it's state tree that is causing the crash because the stack trace is quite explicit

UnrealEditor_StateTreeModule!FStateTreeExecutionContext::GetExecState() [D:\build\++UE5\Sync\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Public\StateTreeExecutionContext.h:386]
UnrealEditor_StateTreeModule!FStateTreeExecutionContext::GetInstanceDebugId() [D:\build\++UE5\Sync\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Private\StateTreeExecutionContext.cpp:586]
UnrealEditor_StateTreeModule!FStateTreeExecutionContext::TriggerTransitions() [D:\build\++UE5\Sync\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Private\StateTreeExecutionContext.cpp:1584]
UnrealEditor_StateTreeModule!FStateTreeExecutionContext::Tick() [D:\build\++UE5\Sync\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Private\StateTreeExecutionContext.cpp:427]
misty wharf
#

Haven't seen anything like that, you'd have to debug it I think to find out what's up... Given it mentions TriggerTransitions it sounds like there might be something wrong with one of your state transitions though

wide robin
#

Also, asking an opinion, are State Trees really worth using for simple things? I.e., if doing a simple AI with a walk to objective and then wait, it feels that it's a lot more complicated compared to do so with a Behaviour Tree

misty wharf
#

I don't think there's really a right way or wrong way in that sense... Personally I find them fairly straightforward to use, plus they can be used for other actors besides just AI controllers unlike behavior trees which are fairly heavily coupled to that

wide robin
#

The problem that I'm having, personally, it's one and is about the enter condition fo the different states

#

It's easy for me to make a State Tree where the conditions are never met or a condition is met too easily and i don't want to

#

Another question: where do you store the data? Like, in Behaviour Tree you do it in the Blackboard, but where do you do that in the State Tree?

misty wharf
#

I mostly pull it straight from the owner actor in the tasks, or I have tasks that pull data in

#

But yeah if you find BT's work better for what you want to do, I don't think there's necessarily any reason to not use them

#

State Trees are definitely still missing a few bits here and there, like the ability to run subtrees, which can make sharing state trees across several AI types kinda annoying or duplication-heavy

wide robin
#

but yeah, feels like they are still a bit incomplete and not fully ready to be used, in my opinion

#

thanks for the answer again, it's always nice to have another point of view

misty wharf
#

My BT tasks and stuff also pull data straight from the pawn and controller pretty often

#

I don't really like BB's that much... they're good for some purposes, but for others not really, and especially with AI's that have a lot of data it seems you'd end up with a bazillion BB fields that you'd use in like one or two places

wide robin
#

Maybe I feel more comfortable with BT and BB only because I used them a lot

misty wharf
#

I think having some kind of BB-type mechanism in ST's could be good as well. Like being able to have more than the one context actor variable

#

You can extend it with custom stuff into the context but it seemed to be really complicated when I looked at it a while back

wide robin
#

it feels like having one place to have a bit of data and only care about that would help

#

also because, without it, it feels it's difficult to keep track of all the data that you might have here and there in BP

misty wharf
#

Yeah kinda depends on what the task is. A lot of the ones I have are kind of specific for a particular type of AI so it's fine if it uses GetExternalData to pull it

wide robin
#

yeah, i saw your way of designing it and it's a good way to work with it tbh. I might go back to State Trees in case I'll need them but feels like that, atm, BT are the way i feel more comfortable with

queen vortex
#

how can i make enemies pushable? I'd like to slowly shove them aside if they're lighter than the player when both bump together
all pawns derived from acharacter

#

is this something doable with physics or behaviour in the character movement component, or would i need to do some coding?

misty wharf
#

You can apply a force to the character via the CMC

queen vortex
#

that seems like a viable option

misty wharf
#
const FVector OwnerLocation = GetOwner()->GetActorLocation();
for (UPrimitiveComponent* Comp : OverlappingComponents)
{
    FVector PushTo = bPushAwayFromOwnerCenter
        ? (Comp->GetComponentLocation() - OwnerLocation).GetSafeNormal()
        : PushDirection.Vector();
        
    if(PushTo.IsNearlyZero())
    {
        PushTo = UKismetMathLibrary::RandomUnitVector();
    }
    if(Comp->IsSimulatingPhysics())
    {
        Comp->AddForce(PushTo * PushForce);
    }
    else if(auto* CMC = Comp->GetOwner()->FindComponentByClass<UCharacterMovementComponent>())
    {
        CMC->AddForce(PushTo * PushForce);
    }
}
    
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
queen vortex
#

what functions would i use for that- ah

misty wharf
#

This is some code I use in one of my projects for the purpose

#

I have a component which collects overlapping actors into a list and runs this on tick to push them around

queen vortex
#

do CMCs simulate physics by default?

misty wharf
#

No, CMC is incompatible with simulate physics

#

It has its own physics simulation

#

that's why you have to add the force to the CMC instead of using the component's add force

queen vortex
#

understood, thats fine

misty wharf
#

the above code I use also supports pushing regular physics based actors, but that part is not needed if you just want to push characters

queen vortex
#

do you do pushing in singular bursts or granularly each frame?
just a preference question, perhaps you experimented with both?

gusty trellis
#

guys is there a way to return something when ur AI move to the location u told him succesfuly or do i have to manualy track it with an overlap event ?

misty wharf
#

It depends on how you want the effect to behave, a weaker slower push would probably work better over time, but a stronger one could be just one burst also since it would probably push the target further away

misty wharf
gusty trellis
misty wharf
#

Oh, if you mean the BT MoveTo task, then that task finishes only after the move has finished

gusty trellis
misty wharf
#

Yeah anything you place after the MoveTo in your BT would only run after the AI has reached the destination

hot narwhal
#

Do you have any resources about how to aggregate tick calls ?

celest python
hot narwhal
#

Ok i'll check that, thanks !

rare pebble
#

i have this aic setup, blackboard, and enemy bp but the enemy is not moving towards theplayer character and dk why really 😦

rare pebble
#

nvm

uneven cloud
queen vortex
uneven cloud
queen vortex
#

oh, well is there an equivilant on the character?

uneven cloud
#

No.

queen vortex
uneven cloud
#

NotifyBumpedPawn

languid meadow
#

I'm trying to get into StateTrees for my AIController moving a pawn around. I have a State Tree Task: STT_MoveToLocation which uses a MoveToLocationOrActor latent node to move the pawn using the controller. The problem is that I can't transition out of the node until the task is finished. Are tick transitions not checked while a task is running?

gusty trellis
#

how can i get this line and togle "observe blackboard value" in a custom task guys ?

gusty trellis
mild bobcat
gusty trellis
mild bobcat
# gusty trellis its have to be in cpp ?

Not sure if it has to, but it'd probably be easier than in BP. I haven't worked on directly replicating that before.

But with C++, you get to see literally how they did it and what they do...

gusty trellis
uneven cloud
# gusty trellis so u can 😄 how do i do that ?

Well you can add that functionality by adding variables and the code needed to do that. However I don't understand why you are making a very specific task instead of doing it as a sequence and using the built-in move to.

mild bobcat
#

Yeah why can't you use MoveTo and then a CustomTask_Sit, instead of MoveToAndSit?

gusty trellis
#

also its use the same values so my brain was bugguing on that

#

like the sit target for the motion wraping and the move to

#

thats why i made it in one go but u guys are right

#

i was also curious to know this cause it could have been usefull in custom task

#

but i was thinking it was a c++ thing since u can't see the moveto base task in bp

uneven cloud
#

The way you are trying to do it is reimplementing functionality that already exists. You need to learn to not reimplement things that you don't need to.

mild bobcat
uneven cloud
#

The move to BT task doesn't just call move to. It actually does a lot of important things, like abort the move when the task is aborted.

gusty trellis
mild bobcat
#

ok yeah not "just," lot of managerial things, besides it

uneven cloud
#

As well as allow you to observe changes in the blackboard that triggers a repath.

gusty trellis
#

yeah thats for the repath i was asking

#

but dw guys ill use the base moveto and a custom sit task

uneven cloud
gusty trellis
#

@mild bobcat @uneven cloud thx for the infos

alpine rover
#

im in 5.3.2 and my AI debug menu (') wont open

mild bobcat
dense owl
#

Altho iirc it should work in both

median socket
#

I keep getting this ensure failure the first time a certain custom BT Task is ran (BTT_MoveToRandomPoint). It freezes the editor for a few seconds and pops a call stack, but everything seems to work apart from that.

LogOutputDevice: Warning: Script Stack (2 frames) :
/Game/Blueprints/UI/Subtitles/BehaviourTree/Tasks/BTT_MoveToRandomPoint.BTT_MoveToRandomPoint_C.ExecuteUbergraph_BTT_MoveToRandomPoint
/Game/Blueprints/UI/Subtitles/BehaviourTree/Tasks/BTT_MoveToRandomPoint.BTT_MoveToRandomPoint_C.ReceiveExecuteAI
LogStats: FPlatformStackWalk::StackWalkAndDump -  0.048 s
LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: AsAIController  [File:D:\build\++UE5\Sync\Engine\Source\Runtime\AIModule\Private\Navigation\NavFilter_AIControllerDefault.cpp] [Line: 20]
(more UnknownFunctions[] after this)
#

This is the Task. Nothing super weird, I thought.

#

Does anyone have any idea what might be causing it?

#

I don't know if the context provided is enough. I thought I had editor symbols to reveal UnknownFunctions, but maybe not.

#

In addition, this only seems to happen the first time this function runs. Subsequent PIE:s work fine.

#

Heres a few extra lines of stack but again, useless in my eyes:

LogOutputDevice: Error: [Callstack] 0x00007fff7b21d03d UnrealEditor-AIModule.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007fff81c30b4a UnrealEditor-NavigationSystem.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007fff81c31046 UnrealEditor-NavigationSystem.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007fff81c38a1c UnrealEditor-NavigationSystem.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007fff81c6b518 UnrealEditor-NavigationSystem.dll!UnknownFunction []
#

I'll see if creating the Task anew fixes this... I suppose it could be ✨blueprint corruption ✨

#

I guess changing that Target variable might be forbidden if the Task should be considered const? (but that feels unrelated to me)

#

No, still happens with a fresh blueprint task and no Target variable being modified

#

I believe I might have found the cause: the nav filter. Switching from NavFilter_AIController_Default to Recast_Filter_UseDefaultArea seems to have mitigated it. Or it was just luck... I'll edit this message if it keeps happening.

misty wharf
#

so much for the cool line

#

lol

median socket
#

haha sorry

#

I will re-add it later, something came up!

cyan cairn
#

Quick question are Decorators still executing after their value will be true?

gusty trellis
#

hey, i dont understand why the boolean toggled doesn't take effect on every instance of npc (see screenshot and video) the screenshot is from the task beng fired that set the boolean and the video show that only the first one have the expected behaviour wich is having his abp set on the sit state machine after the siting animation

misty wharf
#

Get Actor of Class, singular

gusty trellis
misty wharf
#

Well I don't know how your system works beyond what's in the screenshot

#

get actor of class returns one only, get all actors returns all that currently exist

gusty trellis
#

ok cause i want it to be instanced on the npc that do that task,
This boolean is set in the parent of npc class and the abp check if its up or not to change his animation and i get that class to change it in the custom task after the sitting animation but i think its not the good way or i need to get all actor and filter with the "controlled pawn" of the event receive Execute AI and change it only on the concerned instance ?

misty wharf
#

So you're trying to trigger a sit animation when the npc reaches the bench?

gusty trellis
misty wharf
#

Right - why not just set the boolean on the npc the BT belongs to?

gusty trellis
#

thats what i was actualy thinking lol it sound the most convenient

misty wharf
#

That seems like the way to go yeah, you can just use the Controlled Pawn variable in the BT task

gusty trellis
misty wharf
#

I mean the parameter to your BT task event should have the reference to the pawn

#

which you can use instead of get actor of class, since it gives you the pawn that the BT belongs to

gusty trellis
#

im so dumb -_-

wide robin
#

hello! I'm creating a simple AI that moves to random points using AngelScript for the tasks.

I made this script to make the AI move and, once they reach the destination, they stop executing the task. I'm wondering though if i'm doing something wrong or if this could be done in a better way, also because the distance now depends on the actor dimension.

Here's the code:
`FVector Destination;
EPathFollowingRequestResult MovementResult;
float AcceptanceRadius = 10;

UFUNCTION(BlueprintOverride)
void ExecuteAI(AAIController OwnerController, APawn ControlledPawn)
{
    //Get destination from the Blackboard
    Destination = OwnerController.Blackboard.GetValueAsVector(FName("Destination"));

    //Draw a sphere in the destination point, for debug purposes
    System::DrawDebugSphere(Destination, 20, 12,FLinearColor(0,0.33,1,1), 10, 2);
    
    //Move the AI to the location
    MovementResult = OwnerController.MoveToLocation(Destination, (AcceptanceRadius/10), true, true, false, true, nullptr, true);
}

UFUNCTION(BlueprintOverride)
void TickAI(AAIController OwnerController, APawn ControlledPawn, float DeltaSeconds)
{
    //Print(f"Distance = " + Destination.DistXY(ControlledPawn.GetActorLocation()));
    Print(f"Distance = " + Destination.Distance(ControlledPawn.GetActorLocation()));
    //Check if destination is reached
    if(Destination.DistXY(ControlledPawn.GetActorLocation()) <= 50){
        FinishExecute(true);
    }
}`
#

my main concern is the distance calculation. What I mean is, i.e. if I create another blueprint that derives from the script I made, then depending on how big it will be, the distance between the point and the actor will be different, so I will need to change the acceptance radius. Is there a way to make this modular and based on the size of the actor? Should I take the size of the actor then and consider it when calculating the distance from the point?

misty wharf
#

I don't know about AngelScript but the builtin moveto stuff should be able to take into account the actor radius

#

it might be one of those true, true, false, values you're passing into MoveToLocation

#

If it doesn't work for whatever reason, you can certainly just take the actor's capsule and get its radius

gusty trellis
#

Quick question might be weird, does blackboard variable are instanced per npc using it ? i mean does each npc as is own instance of blackboard variable ?

misty wharf
#

Yeah. Blackboard properties are not shared between instances unless you enable it from the settings for the property

gusty trellis
lean karma
#

Hello, is there a possibility to get Receive Tick AI to run inside a BehaviorTreeDecorator? Or does it only work in a ServiceBP?

#

Since i can override it inside a Decorator i thought it should work, but the tick never fires

misty wharf
misty wharf
lean karma
#

Thanks, but sadly i cant find anything like that xD

wide robin
#

so maybe i'm missing something there

#

and i'm doing that since the moveto method returns "success" if there's a path to reach the destination as far as i understood

misty wharf
#

There should be a way to determine when the move has finished via delegates also

wide robin
#

oh thanks for the tip

#

i just found that there's a “Get Move Status” method

#

maybe that would help

uneven cloud
uneven cloud
median socket
misty wharf
queen vortex
#

so ive finally made my characters able to push each other around, using AddForce in the Character Movement Components, but when i apply equal force to both participants, the one who is moving seems to suffer far more than one standing still, even when the latter is a quarter of the mass
I'm thinking some kind of friction/braking values might be involved in this that are causing a non moving char to stop themselves much earlier

any idea where i should look?

In this case, the ones standing still have no controller, they are braindead (there's a tickbox to make it work on chars with no controller)

misty wharf
#

Most likely the active velocity from the movement is affecting it

#

You can try resetting the velocity of the actors to 0 before applying the force

queen vortex
#

although it would make sense that friction/braking don't apply on a target that's moving

misty wharf
#

It's worth a try. Also note that if you're not setting the "ignore mass" flag, the weight of the actor will affect it as well

queen vortex
#

what exactly is worth a try? One already isn't moving

misty wharf
#

Resetting the velocity I mean

queen vortex
#

in any case this isn't a workable idea, i want to maintain velocity, the goal here is to allow a big guy to shove his way through small goblins

mild bobcat
#

why not make the big-guy dominant in the physics and only affect the goblins

#

There are linear braking values somewhere in the engine, look for damping

queen vortex
# mild bobcat how physics-based are you looking?

I'm using the AddForce function built into a character movement controller, its a sort of fake physics, but it should work for my purpose

the same force is being applied to both characters, the goblin weighs 25kg, the player weighs 100kg. When they collide, the goblin should be pushed farther, its getting pushed less than the player

queen vortex
mild bobcat
#

There's Braking Friction Factor
Ground Friction
"Physics Interaction" section i believe only applies to interactions with physics actors
It even has built-in things like repulsion force, etc, but it doesn't play well at all with CMC

queen vortex
#

ahaha this is fun

mild bobcat
#

Have you already debugged the acceleration values applied on the characters?

queen vortex
#

i turned them all off and now i'm playing air hockey with goblins

#

i shove them and they just go wheee

mild bobcat
queen vortex
#

oh god its self sustaining now they keep bouncing off each other

mild bobcat
#

goblin collider

queen vortex
#

one of them built up enough momentum to launch me out of the map

mild bobcat
#

I'm guessing you want the ground to have friction but maybe reduce the friction factor.

queen vortex
#

i present a video of the goblin collider

#

i'm not even entirely certain why it worked like this, they seemed to keep building up speed, whenever a goblin touched another it launched it faster than itself is moving

queen vortex
#

i found that braking friction is the value i wanted, and setting it to 0.5 or less for goblins gives pretty good results

uneven cloud
misty wharf
#

Did you use the delegates from somewhere else like the path following comp for it?

#

because:

protected:
    UPROPERTY(BlueprintAssignable)
    FGenericGameplayTaskDelegate OnRequestFailed;

    UPROPERTY(BlueprintAssignable)
    FMoveTaskCompletedSignature OnMoveFinished;
shy isle
#

just a question I made in another channel: if I want to make an actor with custom movement, and make that actor to be player controlled, and AI controlled, I have to replicate the same movement system using two completely different methods? (an AIcontroller and a PlayerController)

mild bobcat
uneven cloud
uneven cloud
#

AI movement uses either RequestDirectMove or RequestPathMove

shy isle
#

which component defines those functions? and how could I make a custom nav movement controller? Only with c++? Using blueprints it seems I can't base them on it

uneven cloud
#

The movement component. Specifically the Nav Movement Component. There is no such thing as a movement controller.

I believe it is only available in C++. BP really is not a good idea for expensive things like movement.

misty wharf
#

it just NewAITask's it instead

queen vortex
mild bobcat
#

CCD's expensive, though

#

But it's likely just a side effect of how fast they're moving makes them collide deeper and thus have more cumulative force applied.
If you want the character to just be able to move them aside, it may be better to apply repositioning instead of acceleration.

dusk condor
#

Any thoughts about generative AI models and how they might influence Unreal Engine's toolset?

mild bobcat
uneven cloud
sudden field
#

The most I can really see them doing with gen AI is the same sort of thing that github copilot (which is just GPT) is decent at: boilerplate code

#

I think that Unreal's blueprint and Behaviour Tree systems are already quite accessible to folks with less programming knowledge. AI might help with "how do I code this behaviour?" but not with "how should this AI work?"

stiff gale
#

Why i can't get navmesh to appear inside the houose as well

crimson galleon
dense owl
naive sorrel
#

Hello everyone, I have a problem of AI making my game crash in shipping builds (not in dev builds), and mostly when another player joins, thing is I think it's a replication or authority thing, uncertain since debugging doesnt give me much, are there rules to follow for AI specifically or anyone had this problem ? ( I first place the AI on the map and destroy them after 5s and respawn them through the GM to have it synced is it the right thing to do ?)

#

The main thing is also the package difference between shipping and dev ? What should I be looking for

primal vigil
#

Guys any tips how to make basic AI npc? I have planes and I want have bunch of NPCs planes chasing me and shooting at me, I guess I should use behaviour tree but I am not sure how to make chasing because it should not be always on my tail as then I Wont be able kill it

misty wharf
#

You would need to first decide how you want it to work really

#

For example, let's say that you want the AI to lose tracking if the player banks hard for a given amount of time, so you would need to make a BT (or whichever way you implement your AI) that would cause a different task to run if that happens

primal vigil
#

idk how to make it but definitely plane should be not OP

#

it shoul sometimes lose you

#

or lose fight

misty wharf
#

No one can really tell you how to do it, because it depends on how you want your gameplay to work

#

I'd start by just building the very basics of it so the other plane can chase you, and then add things into it and see how it plays

gusty trellis
#

hey guys i want to run a tick ai event in a service to track a task interruption from the player (dialogue interaction) and i need to get the player class to get the boolean that is set when the dialogue interraction occur and i was wondering if it was the good way to do it, is that not a performance problem to run a get actor of class in an event tick running in a service ?

queen vortex
#

can someone explain what this Crouched Half Height variable does?

misty wharf
#

EQS is asynchronous. You need to bind an event to query finished or whatever it was called

misty wharf
#

Or rather, that's the height the capsule gets adjusted to

misty wharf
queen vortex
# misty wharf It adjusts the capsule height when you crouch

why not just call it crouched height, then? are you sure that's all there is to it?

I don't see any particular reason that the height of a crouched character would be half of their standing height, a lot depends on posture and limb lengths

lyric flint
misty wharf
#

Half-height because it's the half-height of the capsule due to how the capsule height is calculated

queen vortex
#

so the actual crouched height of the character is going to be double whatever i put in that box?

#

what about Perch Additional Height?

#

alright., code design question:
I have created a system that allows characters to shove each other around, it works great, although it works on a frame by frame basis while they're touching

I also have animations for stumbling and staggering, i want to use these with the system, but the question is how. Not the actual animation playing, but how do i decide when an actor is staggering

#

all i really have to go on is knowing that a bumping event happened, the force involved, and their velocity. But there's lots of small bumps where a staggering animation would seem overkill, i really only want to use it in cases where someone is being shoved back several metres

#

how do i decide when a char has been shoved enough to warrant entering a staggered state, how long should i play it for before i consider them to be under control again, i need some thoughts and advice here

misty wharf
#

Maybe you can just determine whether the force is sufficiently large?

#

Otherwise you might need to measure the amount moved across some period of time

queen vortex
lyric flint
queen vortex
#

assuming that i track velocity changes accumulated from applied forces, how can i then determine when that velocity change has been fully counteracted? Either from braking friction standing still, or from acceleration in a desired direction by attempting to move?

#

in the first case it's easy to just check if speed falls to zero, not so much in the latter case

grave wraith
#

why I can't fire interface event from ai to bed blueprints? my message in AI is firing but event not working
I belive it is becuase message target but how I can target bed blueprints?

misty wharf
misty wharf
lament mortar
#

Holla, Am having a weird issue
the sight perception for some reason is only looking one direction and does not rotate with pawn facing direction

#

how can i solve this?

shell shadow
#

Is there a 3d pathfinding solution like Cpathfinding on marketplace, that actually can package with the project? For 5.3

crimson galleon
upbeat hamlet
#

what's the best way of adding a bit of delay between the loops of the loop decorator?

shell shadow
rose drift
#

Greetings!
Have a wird bug: When servers player dies (by any mean), all AI disables AIPerception component. Any clue?

mild bobcat
mild bobcat
mild bobcat
lament mortar
uneven cloud
naive sorrel
uneven cloud
naive sorrel
#

How would one do that ?

#

without it being bad

uneven cloud
#

You just spawn them. If you need to change the settings, which I don't understand why you would do that, you set it up so whatever spawner has those settings.

uneven cloud
naive sorrel
uneven cloud
uneven cloud
naive sorrel
#

Yes but how can I give a variable to an actor that isn't spawn

uneven cloud
uneven cloud
# naive sorrel Yes but how can I give a variable to an actor that isn't spawn

You put the variable somewhere else and then set it when it's spawned. How you do it entirely depends on how you spawn things.

Let's say you spawn things using a spawner in the world. On the spawner you need to have spawn data, which includes the classes to spawn, the amount to spawn and whatever variables you need to set. Let's say a spawner needs to spawn 5 NPCs, 2 that roam and 3 that follow a path. So you set up your spawn data to be able to set that.

naive sorrel
#

Imagine if each NPC has a specific behavior, DO you think I would need an equal amount of spawner ?

#
  • How does authority and replication work for spawners
uneven cloud
lament mortar
uneven cloud
lament mortar
uneven cloud
uneven cloud
lament mortar
#

I mean...

#

lol

uneven cloud
dense owl
uneven cloud
uneven cloud
lament mortar
#

can't find that function

uneven cloud
lament mortar
#

there is getactoreyesviewpoint

primal vigil
uneven cloud
uneven cloud
uneven cloud
# lament mortar oh it was that function thx

You're welcome. I use a socket on the mesh and then use get socket location and get socket rotation. A socket allows you to put it exactly where you want it (between the eyes). It'll also work with head rotations if you add look at functionality.

lament mortar
uneven cloud
lime mortar
#

You don’t

uneven cloud
#

I've seen people do it.

dense owl
uneven cloud
uneven cloud
#

Thanks!

gusty trellis
#

is there a counter indication to bind an event dispatcher in a service task ?

uneven cloud
#

If you want to bind to something in a service while the service is active, I would use On Become Relevant to bind and On Cease Relevant to unbind.

gusty trellis
# uneven cloud What do you mean by a counter indication?

idk its to avoid using the event recieve Tick AI but if at the end it take more to listen to the bind, but i was just lost in my mind, what are those Become relevant and On cease Relevant ? thats not default function i can override

uneven cloud
#

Those functions are called when you first enter and exit the branch the service is on. They aren't well known, but incredibly useful.

gusty trellis
dense owl
#

No, they’re overridable functions from the details panel afaik

uneven cloud
gusty trellis
#

im gonna use them then and use an event dispatcher the thing with those tick running on instance of actor scare me im to nooby to know what cause real performance problem or not

uneven cloud
#

I really hate it when Epic changes the names of things between code and BP. It's only sometimes and it's very confusing.

coral mesa
#

looking at statetree component code and why this does even exist to begin with?

uneven cloud
gusty trellis
uneven cloud
primal vigil
uneven cloud
uneven cloud
#

Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.

delicate linden
#

Is anyone available or willing to help me trouble shoot my behavior tree?

uneven cloud
limpid stump
#

I have a question in regards to creating an AIController cpp class in Rider as compared to creating it in Unreal. When I go an create a cpp class of type AAIController via rider and try and build, I get build errors with this message. However, when I delete the .cpp and .h files, I can build and not have any problems, except I'm out an AI Controller. Now when I go in Engine and create new c++ class and Choose AIController from there, it creates it and I don't have any problems, and the .h file actually has less lines of code, only the GENERATED_BODY(). Is there something I missed that I needed to do?

mild bobcat
#

I was copy pasting code from other classes etc, running into issues with the right includes & inheritance

naive sorrel
#

Hello, so I'm looking for a way to respawn AI's with this spawning way I have. Anyone would have an Idea ?

misty wharf
#

What exactly is the problem with this?

naive sorrel
#

And I have no idea on how to do it

misty wharf
#

One way to do it would be to assign a listener to the actor's on end play event, which you could use to trigger it to be respawned