#gameplay-ai

1 messages · Page 23 of 1

grave compass
#

I'm trying to make ai perception for a monster that sees me.
My character has an AIPerceptionStimuliSource.
This way the monster sees me. Everything is working properly. However, there is another blueprint that is a child actor in my character.
And although there is no stimulus attached to it, the beast sees that too.
How can I make it not see this child actor?
And I don't want to change the collision of this

open swift
#

maybe a dumb question but i'm just getting started with behavior trees. I have a bunch of components right now on actors that handle things like damage/healing, threat (taunt, fixate, vanish, threat drops, etc.) and target selection, and such for basically all of my combat functionality. In designing a behavior tree, is the expectation that all of the things I need to access in the behavior tree (like current target, current health %, current abilities) are copied to a blackboard when they change (essentially duplicating everything) so that the behavior tree can track changes, or is there some way to just reference variables that already exist in components of the actor and be notified when they change? I have multicast delegates attached to most everything but wasn't sure if I should be trying to subscribe to those somewhere in the tree

gusty bridge
#

Hi, a quick question. What's the difference between AIPerception and PawnSensing? I believe they both have an ability to sense sound, hearing, etc. Is PawnSensing specifically designed for pawns?

terse bear
#

any thoughts?

uneven cloud
uneven cloud
open swift
uneven cloud
noble horizon
#

i made a basic enemy AI for my game, there is supposed to be groups of enemies chasing after the player, but they all walk right into each other thonk
I'm having no luck with google, and no luck messing around with their collision settings. They walk around static objects perfectly fine, but wont avoid walking into each other like in all the AI tutorials ive seen.
anyone know how to make them avoid walking into each other?

terse panther
noble horizon
grave compass
# uneven cloud Is the child actor a pawn or a character?

It's a pawn, but I turned off all pawns to have views in the project default settings. So if I throw it on the stage, it can't see it, but if I make it a child to my character, it also sees it with the ai stimuli source that exists in my character. this is my problem

civic canyon
#

I have an AI that moves along the ground using a navmesh, but I also need a flying enemy that hovers above the player. How can I use the navmesh to do this?

wanton compass
#

How would I go around synchronizing enemy AIs with each other to implement simple tactics in their behavior? I was thinking of having some kind of swarm controller, or a hive-mind if you will, but I'm not sure what'd be a good place to put that logic and wanted to make sure there's not a dedicated solution that I'm missing.

dawn schooner
gilded tree
#

I want to make an AI actor that essentially is a fireball that patrols around, and follows the player if spotted. Regular AI is fine, but how do I make the orb fly, and avoid obstacles? I dont want it to go flying too high either, just enough to avoid elevation-changes 🤔

I could obviously just cheat it and make it travel elevated from the ground although that removes the orbs ability to fly straight to the player. Is this where BOIDs come into the picture, even if its just one actor? Never used that before.

quartz shadow
#

Hello everyone, I see that Epic has developed AISubsystems that does inherit from classical subsystem is there any advantage to use them ? It looks like it is harder to set up than classical one and less versatile (We can not easily say I want this subsystem on client for example)

civic canyon
#

but yeah it should be within the same area ideally

sullen prawn
#

what do these values do?

sullen prawn
#

i found out

#

nevermind

fringe ermine
#

guys, I have this idea, dunno how feasible it is. Have you ever come across the AI feature in versus fighting games, such as Street Fighter, where you can create a CPU-controlled match? I was hoping to develop a similar concept for movies, cartoons, and cinematography. Essentially, users would select a character and their moveset, be it karate, muay thai, or the like, and these characters would engage in a realistic battle, akin to the video example I have linked
https://youtu.be/hueZgTiE-qQ

ocean wren
fringe ermine
fringe ermine
ocean wren
#

Well, I mean in games we can use motion capture, so we could capture Jet Li or anyone else

#

And using machine learning you can generate motions that are similar

#

There's new models of animation like SinMDM that use diffusion models for animation (bit like an animation version of the image generation models)

dark sequoia
#

running automated tests for anything involving players is going to require some sort of AI

ocean wren
#

Modl.ai are doing a lot of automated testing work

#

Diffusion based animation models are pretty interesting though yeah

#

There's new models of animation driven by language too.. so you can say "walk forward two steps" and it animates that

#

Which, if you think about the new papers involving large language models as generators for behaviour and dialogue, could quite easily be similarly used to generate movements from language as part of it. Or generate dialogue, which can then generate voice synthesis and then that could generate facial and body language content..

#

Quite an interesting time

uneven cloud
uneven cloud
uneven cloud
unborn depot
#

I want to turn my AI character after used AI Move To node on task. SetControlRotation seems not properly working after used AI MoveTo node. Is there some pawn or AI Controller settings that i should to change? I am using Advanced Locomotion System v4's AI Pawn & Controller.

#

And here are the current pawn settings for desired rotation

ocean wren
dawn schooner
ocean wren
#

Its kind of weird, because there's a ton of students, you know, masters or PhD students.. writing frankly terrible code in python, which could be so much better engineered by games programmers and making really amazing stuff

#

Guess its not a thing the games industry is interested in yet though

dawn schooner
#

I bet it's coming soon given the amount of AI stuff we're seeing lately

ocean wren
#

You'd hope so.. but I don't get the feeling they're serious

#

I mean Epic have bought a few companies that are doing ML, like Cubic motion.. so maybe that will change eventually.. but I get the feeling that senior leaders at Epic don't get it.. certainly they haven't invested in AI to my knowledge

#

They will do eventually I suspect

#

ML based PCG being so generally powerful to scale up content

#

Maybe they'll wake up a bit as NVIDIA does some new content stuff

dawn schooner
ocean wren
ocean wren
#

I suspect that we'll be using language a lot more as guidance for content generation, at least that's what I've worked on this year

#

voice control for unreal engine is kinda fun

#

but we're way beyond that now

celest python
#

@ocean wren any idea what kind of behavior tree this is?

ocean wren
#

Looks a bit like nvidia omniverse?

#

To be fair, could be any toolset, just has an omniverse vibe

celest python
#

its an in house tool but design looks awful yet from what I can see its made by a skilled programmer so i wonder why i see state machine in a bt 😄

ocean wren
#

You'd be surprised how many BT's have FSM and how many utility systems are in BT's

celest python
#

how about this part?

#

is it the BT itself or just transition of the FSM?

ocean wren
#

That's the BT

#

the middle bit is a state machine at the top level

celest python
#

transit condition tree Thonk

ocean wren
#

so I guess that BT is one of the trees run when in a given state

#

Yeah, that BT seems to have conditions for the state transition

opal crest
#

Yeah, that's what that looks like. I don't know what advantage there is to structuring that like a BT (instead of a classic function)

ocean wren
#

Well, top level state machine isn't that unusual, its basically like a heirarchical state machine, its just that the substates are implemented as a BT

opal crest
#

Yeah, the top level state machine isn't surprising to me. I just wouldn't expect transition logic to be formulated like a BT.

ocean wren
#

Yeah, its a bit weird, but hey.. I'm all for a bit of experimentation

signal island
#

where is the best place to put AiPerception? Character or AIController.

fading gorge
#

has anyone had this issue when using a state tree?

My editor will crash if I recompile the actor blueprint and forget to recompile the state tree its using. Even though the state tree isnt showing up that it needs a compile. Since its not registering the compile, if i dont manually recompile the state tree its causing the crash.

Seems to be coming from a binding to a bool variable on the actor the tree is on during a event tick transition condition

Ive been able to narrow it down with the information from this forum post, but the always having to remember to manually recompile the state tree after ANY actor blueprint change is driving me crazy

i want to assume its a bug but im also not 100% sure its not me doing something I shouldnt be with the binding

it almost seems like the state tree is trying to access an old address from the blueprint that gets moved after the compile or something?

The error:
appError called: Assertion failed: FieldSize != 0 [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 2518]

https://forums.unrealengine.com/t/blueprint-help-state-tree-in-hud-crashes-when-i-compare-boolean/815711

Epic Developer Community Forums

Hello, To manage my Ui i added a state tree component in my HUD subclass. i have some bool in my HUD class, and i compare bool in my "enter Conditions’ for each states in the state tree. A crash occurs when i recompile my HUD and hit play. I’ve eliminated all the possibilities, and i isolate the issue : The Bool compare in enter conditions ...

dawn schooner
lyric flint
#

This is tangentially an AI question, but: I have a data asset which contains an array of EQS queries that an AI can use. Each of these EQS queries can have zero or more data bindings that represent tunable values on that specific query (e.g., search radius, health amount, maximum path length). I would like to be able to tune these data bindings from the data asset itself.

For example, I have DA_One and DA_Two which both contain the query EQS_NearbyActors. However, DA_One needs to set its radius to 800 where DA_Two needs to set the radius to 1200.

I thought I could just use EditInline and it might expose the data bindings, similar to how it exposes public variables on a blueprint, but that's not the case. Does anyone have any suggestions on how to expose the data bindings of an EQS query when it is selected inside a data asset?

uneven cloud
uneven cloud
uneven cloud
sullen quest
#

@uneven cloud Are you by any chance AI luthage from the unreal subreddit?

sullen quest
#

I found your answer to a post about focus when moving AI using AI MoveTo

#

Is there a way to disable the rotation to the next path point when using it?

#

I know I can use SetFocus but I dont like the idea of enemies tracking the player with pixel perfect accuracy

#

I'm also trying to use SetFocalPoint but I can't find a way to interpolate it correctly to slowly look at the player

uneven cloud
#

Unfortunately without changing source you can either use the control rotation or not. If it's on, it'll set focus for the path point. If it's off, then set focus/set focal point will no longer work.

You can use set focus with a higher priority than movement to override the one during pathfinding, but I think that's only available in C++. It's how we usually do strafing.

You can slow down the rotation rate by using the character movement component. You have to uncheck use control rotation in the character and turn it on in the CMC.

sullen quest
#

I see, what does Allow Strafe exactly do? It seems to set the focus to the next path point at the start of moving but then it lets me change it

#

But that makes the AI Controller always rotate to the path point for 1 frame when it starts moving

uneven cloud
#

I don't remember what it does exactly. I've just used the other way, because it gives better results. Probably because it doesn't rotate to the path point at all.

grave compass
ocean wren
#

None of them are thinking of investing in something before its proven, but by then its already been adopted by everyone so has no competative advantage

uneven cloud
# ocean wren Part of the problem I think, is that there's a lack of awareness in management a...

Part of that is the promotion to leadership based on IC skills and not leadership skills. Then they get no leadership training.

Another part is there is no time to train staff. I'm mentoring 2 AI engineers right now and I have to hire another 2, because the volume of requests keeps exploding.

There are studios with R&D teams, but they are completely separate from dev teams, so what comes out isn't exactly useful.

dark sequoia
#

Just to confirm, EQS testing pawn only renders debug info in the editor window, not the play window? And doing things like moving the pawn through gameplay doesn't affect this.

#

After looking further, it appears the pawn is for editor use only. Somehow missed that.

misty wharf
#

Yeah it's for editor use. You can use it in PIE, you just need to detach from the player pawn to see its output iirc

crude harness
#

Hi All.
I would like to make a platoon of units moving in a formation (such as in Total War, or Cossack, for instance). How would you dot it?

I tried the following:

  • The Leader has a BT: move and set its position in BB, and a Walk speed divided by 2
  • Followers have a "follow" BT with a high refresh rate (SetNextTickTime(NodeMemory, 0.05)) and a call to AAIController::MoveToLocation
AActor* QueryOwner = OwnerComp.GetOwner();
AAIController* ControllerOwner = Cast<AAIController>(QueryOwner);
if (ControllerOwner)
{
    ControllerOwner->MoveToLocation(Memory->NavLocation.Location);
}
SetNextTickTime(NodeMemory, 0.05);

But this is not very nice to see. Do you have other ideas?

#

Purple is the computed positions for the fromation (followers )

uneven cloud
uneven cloud
harsh storm
rare stag
#

I've been strugling the whole day to set up the navigation mesh inside a streamed level, FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld()) returns NULL
Could it be because the recast navigation is inside the streamed level and not persistent? how exactly should I set this up?

rare stag
#

further into in it seems MainNavData is nullptr

#

problem solved 🙂 Setting Runtime generation to Dynamic in Recast is not enough, I had to set it in project settings as well

ocean wren
dawn schooner
#

Yeah I've never had mentoring per se

#

I mean you can always learn from anything and anyone but focused mentoring is nicer

uneven cloud
celest python
#

I guess when it comes to AI, mentorship is even 2x more important because most of the cool tricks are taught in tacit ways compared to other areas

open swift
#

is there some kind of callback i can hook into on a pawn when it gets possessed?

celest python
#

yes, its OnPossessed()

open swift
#

from a component on that pawn i mean, not overriding a pawn function

#

like an event dispatcher or something

celest python
#

i dont remember any

open swift
#

okay, i didn't see anything but figured i'd ask

celest python
#

there are other ways though

#

gamemode should have some functions

#

but same thing, no event dispatcher

#

you'd have to hook yourself

harsh storm
#

You can also hook into the GI for this delegate

#

OnPawnControllerChangedDelegates is the GI version

open swift
#

thanks i will look into these!

harsh storm
#

Posssession changes the cached controller.

lyric flint
#

I am thinking of a way of creating a monster for space invaders type game that could use a laser that will chase player. But i donot want him/her to die an inevitable death

ocean wren
#

They just released a properly open source large language model: https://open-assistant.io/

#

Which is kind of fun.. there's also one by Databricks, but its not as good.. looking forward to a merge of the two

#

And using them both in a langchain agent connected to UE

open swift
#

Dumb question: do decorators just tick and check their condition every frame? Trying to understand how to make an event-based decorator that will abort when a certain event fires off without checking that condition every frame. I have dispatchers set up elsewhere for the event I want to keep track of, is there some kind of “BeginPlay” equivalent in a decorator where I can bind to that dispatcher and some way to manually call abort when that binding goes off?

#

My use case is that I want to cancel moving and other low prio tasks when an ability comes off cooldown (which I can get an event dispatcher for)

patent hornet
#

are you using move to tasks to move your AI?

#

and iirc you just setup an abort decorator on a blackboard key

#

also need to handle the aborted events in your tasks

open swift
#

Was trying to avoid the blackboard key decorator because then I have to add a blackboard key for every ability class I want to track the cooldown for. Was hoping to just be able to select the ability class as an instance editable variable on the decorator itself

#

Also not sure what the best place is to put the logic for a blackboard key changing when an ability comes off cooldown.

signal island
#

i have an actor that generates 1 eqs item and i want to before AI move to its next location, to check if that location is avalible. is there a built in way of doing this?

open swift
#

okay so i just saw that subtrees must use the same blackboard as their parent trees, so I'm not really sure how to go about creating a generic tree that all NPCs use to alternate between patrolling, combat, and resetting, while still having unique combat trees with different ability priorities and requirements and cooldown tracking inside of the "combat" branch of that generic tree. I feel like that's something that should be possible, it would be pretty crazy for there not to be a way to have compartmentalized logic like that without having a massive blackboard with hundreds of keys right?

#

specifically looking for something like a boss fight in WoW, where all bosses have the same "if not in combat, walk around the room, after combat ends, become immune and teleport back to spawn point and start patrolling again" logic while also having 20-30 abilities and multiple phases they go through during combat. Is this not something behavior trees are suited for?

uneven cloud
uneven cloud
uneven cloud
keen crow
# open swift okay so i just saw that subtrees must use the same blackboard as their parent tr...

how to go about creating a generic tree that all NPCs use to alternate between patrolling, combat, and resetting, while still having unique combat trees with different ability priorities and requirements and cooldown tracking inside of the "combat" branch of that generic tree
you might want to look at Run behavior dynamic nodes. Those allow you to map gameplay tags to behavior tree assets at any moment (for example at AAIController::BeginPlay). Then you could have your main tree to have a selector between 3 Run behavior dynamic nodes with tags "AI.State.Rest", "AI.State.Combat", "AI.State.Patrol" and on some data layer set different combat BTs for different NPCs but the same patrol/resting BTs

open swift
#

That was my plan originally but you can’t run behavior trees with different blackboards that way, so you’d end up with one super-blackboard with keys related to everything

#

I’m looking at either just not using BT at all for the combat part of things (just having a node that says “do combat” or something and then put all the combat logic in a component somewhere) or just manually swapping out behavior trees at runtime entirely

keen crow
# open swift That was my plan originally but you can’t run behavior trees with different blac...

one super-blackboard with keys related to everything
idk man, in my experience one is doing something wrong if he has a lot of specific BB keys. I feel like vectors/actors BB keys for EQS output, actors for target and some float BB keys as parameters should be sufficient for a lot of cases. BTs (IMO) should only organize sequences of actions and not contain action implementation details like attack power, iterating over targets, setting color of fireball, etc.
That is, of course, if you are not doing ultra-complex AI.

open swift
#

I was looking at something like having health thresholds for healing abilities, having enemy phase changes at certain times (boss battles), and just generally prioritizing using different abilities based on any number of conditions like target/own health, buffs/debuffs active, time in combat, etc. Another poster basically just said to do all of this elsewhere and simplify the BT to just be “move to place or use ability”

keen crow
#

well, if such logic applies to all or most of bosses, then this part

I was looking at something like having health thresholds for healing abilities, ... using different abilities based on any number of conditions like target/own health, buffs/debuffs active, time in combat,
looks like doable in BTs. I think you could pass these health, time, etc thresholds to BB floats and have a BT service to evaluate current values and then a selector could switch between various combat subtrees (with some minor magic you can run subtrees inside of subtrees)

lyric flint
#

I'm trying to figure out how to use RVO avoidance while also maintaining velocity/movement speed? Right now when a unit if within a certain range of another it will start to change direction to avoid it, but it will also slow down

ocean wren
#

Have the utility system decide on the spell etc.. then store the result in the BB for the BT to transition if needed

#

Its always a bit of a balancing act, but I like to keep my BT to the overall decision making at the top level and have subsystems handle the action execution and scoring elsewhere

brave phoenix
#

Hi, Little question. Decision from the Behavior Tree of the IA is influenced by the game FPS? that's the feeling that i have. is it normal? if the FPS drop, decisions done are slower, and calculation of those decision will be bad

uneven cloud
fading field
#

I'm trying to give my AI the ability to find a preferred distance with EQS, but it can only create weights depending on distance in a pretty linear way. I would love to give the EQS a curve that it can use to create weights, is that possible? Now I have to stack multiple distance tests and that's a very impractical way of using it.

uneven cloud
brave phoenix
#

hey, I'm learning all those Behavior Tree things. A concept that i don't clearly understand. If you make a Task. It will trigger a function on the Task. If you don't end the task with "Finish Execture" or "Finish Aboard", it's not supposed to execute the task until it reach on of those 2 nodes?

#

I was expecting to have something like that

#

if the task is not finished, it will perform it again

misty wharf
#

If you never call Finish Execute, the task will never finish

#

However aborts are a bit different, I recall it may still abort and exit the task even if you don't

brave phoenix
#

so by finishing you mean i will be stuck on the non existing node after AI - Move to Location?

misty wharf
#

In a way yes although there's no such thing as "non existing node" in that sense

#

it simply has finished executing the graph at that point and there's nothing left to execute

brave phoenix
#

so to make a simple movement we need to exectute the task multiple time and finish it each time

#

because when i see something like that

#

Il wondering if I use them properly

#

Or maybe it’s normal?

misty wharf
#

If that's happening then the task is exiting (or failing)

#

If you don't call Finish Execute, it will just sit there

#

(assuming it doesn't fail and abort)

brave phoenix
#

Should we use some loop inside those task?

#

ok, it's a kind of loop 🙂

#

i put an infinity loop there... and it's crashing the game 😄

misty wharf
#

Yeah if you want it to repeat some task or such, you would need to make it latent

#

Eg. if you use AI Move To which has the exec pins for when it completes, you could loop that by connecting the pins back to it

brave phoenix
#

it was a custom Task to avoid to use the AI Move To

dark sequoia
#

How do I compare two values in a BT decorator?
I have a BT that when a unit is in range of an enemy, it shoots, else it moves towards.
I have a service that gets the distance to the target as well as the range of the unit. I have a decorator that sees if a BB key is less than a fixed value, but I don't see one that lets me compare two BB keys.

Or is this entirely the wrong approach?

keen crow
#

there's a UBTDecorator_CompareBBEntries but if I was you I'd have the service to compare distance to attack range and then set a BB boolean bAttack to true/false unless you need distance to enemy for any other decorators in the BT

polar inlet
#

ai stuck and wont move to...any ideas? im in a cpp project

#

where should i start

keen crow
#

with vislog or ai debugger with enabled navmesh option

polar inlet
#

the path is there for the ai to walk. it should be able to. it is just stuck suspended in mid air

#

it still shoots and spins to focus on the player. when its on the moveto node in the behavior tree it doesnt move

keen crow
#

maybe MoveTo location is out of navmesh

sleek turret
#

Say I want the user to click on a tree or rock, and then send the closest worker to go mine it

#

A navmesh would be the best way to do that right?

#

Like I want the workers to have queues of tasks

brave phoenix
#

Hey, The 'AI Move to" change the "Arrow Component" direction to the destination target. Is it possible to keep the arrow component into the same direction ? Like we have with 2D game and with (Add Movement Input) ?

sudden citrus
#

General spawning problem: what's wiser, not requesting spawns until we have a navmesh, or requesting them and having the spawning system retry until we have a navmesh?

misty wharf
#

It seems mostly a question of abstractions in a sense

#

Does the code that requests spawns know about the navmesh, or should it know about the navmesh? Or is it purely a concern for the spawning system?

#

There are a bunch of delegates on the navigation system v1 which can be used to listen for when the mesh gets generated etc.

sudden citrus
#

The code that requests spawns is the usual "I want these dudes in these places" and the picking of locations might happen offline or online depending on designer setup. Navmesh generation time isn't obvious because it's dynamic nav. I might get away with it for now by just adding a "wait for nav build" tickbox on the requesting code

#

I don't think the requesting code should concern itself with the navmesh, rather the NPC type it requests should know if it requires a navmesh

hoary totem
#

Hello 👋, if anyone has a brief moment I would like to get some ideas on how to resolve the following issue I am facing:

• My enemy AI (one blueprint only) is programmed to have their health bars reduced on damage received.
• The function "get all actors of class" together with "For each loop with break" is being used to ensure each instance of the enemy placed in a level has their own health bar reduced on damage received.
• This is partially working as the engine somehow automatically selects a -random order- in which my AI enemies within each level have their health reduced on damage received.
• If an enemy is attacked that is not in the random order the engine selects to show health bar damage reduction, the health bar widget is not shown to reduce on damage received 🧐

What would happen to be the issue I am facing at the moment?

Any and all advice, suggestions, tutorials, and support would be TREMENDOUSLY appreciated 🙏

I have been struggling with this issue for over 3 months now 😓

sudden citrus
ocean wren
#

The thing causing the damage should know what it is damaging, so calling an interface/function on the damaged object telling it how it came to be damaged, means you won't have to loop over every object.. basically looping over every object of a type is a bad practice

#

At the very least, get them to add themselves to a collection and only iterate the collection

pine spade
#

I'm an indie dev just getting started with AI. Wanted to ask if there are any decent off-the-shelf assets on the marketplace or other places online that I could play with to start to understand how to program AI. Looking to make a shooter, if that helps.

#

Or would something like the Lyr starter project have good examples?

dense owl
#

You just need to tell it what to do when it takes damage

swift bolt
#

Do AI pawns have a control rotation for x, y and z?

#

I use the mouse Delta for human players but I don't think that will work for AI

uneven cloud
hoary totem
hoary totem
#

Here is screenshot of the blueprint programming that I am struggling with. Any and all suggestions and support would be deeply appreciated 🙏

dense owl
#

If both actors are in the same parent class you can have both of those in the same parent bp

#

Then link your health bar widget to your actor bp to tie the health value to the progress bar.

#

Assuming you’re using a progress bar for health bar

#

It can be a bit confusing but to put it simply, whenever you place or spawn an actor from a bp, you are generating a copy of it with its own separate variables. So you can do things by just having different targets (i.e. self or other actor)

hoary totem
# dense owl Then link your health bar widget to your actor bp to tie the health value to the...

Thank you for your kindness and support. 🙏 Yes, I am using a basic progress bar for health bar display.

Yes, all placed enemy AI antagonist actors are all from the same bp.

No, the damage causing actor and the damage receiving antagonist actor aren't in/from the same parent class.

The ontakeanydamage event is being used within the antagonist enemy AI bp. The apply damage node is being used on the damage causing actor bp.

#

Currently, the health bar (progress bar) widget is not visually showing a reduction in health on damage dealt to an enemy AI unless it is the first one, followed by the next randomly selected one pulled from an array that the engine randomly decides once level begins play.

If there are any visual tutorials or event graph examples of possible solutions, those would also be very helpful at this time.

Thank you truly, everyone, for considering my request. 🙏

hoary totem
# hoary totem

🙏 This event graph displays a function within the progress bar widget. The progress bar itself is binded to this function for the health reduction to show in the widget.

misty wharf
dense owl
lavish carbon
#

can you help me why my bot is not playing animation montage. I'm calling a function from the tree on the actual character that should play animations, he doesn't. I have already checked the animations set in the character itself. I do it in c ++, it enters the function, but it is this line that can be said to do nothing.

umbral relic
#

can i get player input into a bt task?

harsh storm
#

I mean you can - but why would you want it? You pretty much have to send it through multiple systems.

#

It's a roundabout way of doing it at least

umbral relic
#

want an ai to follow mouse clicks

harsh storm
#

Click -> Set target destination on Blackboard -> AI reads value from Blackboard

#

Upon arrival - clear the target destination

umbral relic
#

in the player controller?

harsh storm
#

I'd do it in the behavior tree task

#

Move To and then after that Clear Value

#

Two different tasks

#

You will need to get a reference to the blackboard

umbral relic
#

yeah the click is where I'm stuck though, how do I get the bt task to read the click if i can't have input in it

harsh storm
#

Get a reference to the blackboard. Then set the value like I said.

umbral relic
#

and the reference to the bb is in player controller?

harsh storm
#

If you save it, then yeah.

umbral relic
#

alr ty

terse bear
#

what's the difference between OnBecomeRelevant and OnSearchStart in a service node?

terse bear
uneven cloud
terse bear
#

and OnSearchStart is called when the tree is looking for a task to execute on that specific branch where the service is on?

#

it means that in most cases OnSearchStart will be called first, right?

uneven cloud
uneven cloud
terse bear
uneven cloud
#

Services and decorators are both auxiliary nodes. I think the search start is more relevant to decorators as they change the search flow.

terse bear
#

I believe search start is relevant to services only, in decorators it's a bit different

uneven cloud
#

Example:. You have a blackboard for HasLineOfSight. You have a service to checks for line of sight to a given target and sets a blackboard. With tick on search start, it will run the service BEFORE checking the blackboard decorator.

terse bear
hoary totem
lyric flint
#

why does the main task only run once? I want it to go to the ball while the ball is being constantly updated. Instead the main task does once and the background one just keeps doing what it does. I need the "Found Ball" to be constantly running to be updated and the "GoToBall" to be executing also. They need to be simultaneously running. Is this the right thing for that?

timid condor
#

But if all you want is for the location you are moving towards to be updated, then I believe you don't even need to update the ball's location? You can find the ball once and pass an actor reference of the ball to the "GoToBall" task. Then you can tell it to automatically update the goal. That's assuming the ball reference remains valid and you don't want it to be able to lose the ball

sturdy pendant
#

hello,
i've trying to add an implementation of AISens_Sight, same, it's for the moment just an children of AISens_Sight, but when i choose it, then the sens is not working at all, what i'm missing ?

sour jewel
#

I've added ALS to my AI but it's not walking. I mean it's moving but not walking.

Animation Blueprint of manny Is working fine on skm manny but ALS Anim is not working on ALS Mesh

indigo field
#

Hey anyone found a way to have a Navmesh Volume Bounds generate navmesh like it normally, but also create some in the hole at the bottom (collision-less, default, filling?)

sturdy pendant
# little ridge Can you show some code or BP?
Epic Developer Community Forums

Hi, I think you will also need to create your own NoiseEvent, where you tell the engine to send that event to your UAISens_AdvancedHearing. So you could also create a new NoiseEvent inheriting from the regular one like this: USTRUCT(BlueprintType) struct AISENSETEST_API FMyAINoiseEvent : public FAINoiseEvent { GENERATED_USTRUCT_BODY() typ...

fringe ermine
#

@ocean wren and anyone else... I don't know much about training image data on stable diffusion to generate your own style of images. I know you need a bunch of the type of image you want to train the model on. Now, the question is can you train a model on timelapse video of yourself drawing? I suppose the video with have a more detailed approach as to how the final result will come out...

dawn schooner
#

I'm thinking about how to implement our StateTree tasks and conditions, I wanted to ask how is the C++ API compared to blueprints - I could create some test tasks easily in blueprints, but the C++ base classes seem a bit more complicated. Will I run into issues and should I just stick to the blueprints, and provide C++ functions that I can hook into tasks, instead of defining the tasks themselves in C++?

harsh storm
#

I actually found it to be easier than BT tasks (in C++ that is)

dawn schooner
#

Mmm I see quite a few derived classes from FStateTreeBase so I guess it is not a bad idea

#

I could expose some c++ functionality to the blueprint tasks

#

but that implies coding the main logic elsewhere which I don't fancy

#

I'd rather have the logic contained in the tasks

dawn schooner
#

I also saw people say in some videos that the blueprint stuff was a bit buggy, so I was curious to know if that extended to C++

harsh storm
#

I think the module itself is buggy. I dropped it because the bindings would randomly stop working or I just couldn't bind anymore.

dawn schooner
#

oh damn

harsh storm
#

So I'd have to recreate the state tree to get it working again

dawn schooner
#

well I'll experiment for now, since we are not in a hurry

#

maybe 5.2 brings more stability

harsh storm
#

Noticed I wasn't making progress with my AI, so I dropped the new & shiny in favor of the tried & true, lol

dawn schooner
#

xD

#

not very encouraging

harsh storm
#

I mean, it's cool when it works. And I do like it.

#

But, much like other areas of 5.0 - just needs some more time in the oven imo

hoary totem
# dense owl Again, you shouldn’t need to to use get all actors and for loop, just do it as i...

Thank you for your continued advice. As you advised previously, and as seen in the example above I created an actor component bp and programmed the health reduction function inside the new component.

I added the health bar widget itself as a variable within the component.

I added the component to my antagonist bp, and also called the component's function within the antagonist bp as well. Both additions applied both independently and simultaneously now cause the health bars to show without the red color on all instances of the antagonist bp.

Would you happen to know as to what I could now be facing at the moment?

Thank you truly for your continued support 🙏

Any and all recommendations from anyone would be tremendously appreciated at this time. 😓

dense owl
#

Where is this get antag function located, what bp?

sour jewel
#

Can anyone help me with the ALS?

hoary totem
# dense owl Where is this get antag function located, what bp?

Yes, the get antag health bar percent is a function created within the new component bp, as recommended.

Adding the component itself to the antagonist bp either as a function call or as standalone component within components list removes the red bar color visual data from the health widget. 🙏

quiet fiber
#

Is there anyway to force the move to location or actor function to succeed? I am having an issue where the speed of the behaviour tree runtime seems to result in the AI pausing in between movement commands and I would like to make it more fluid by having the movement run in parallel to the other processes. But I also need to be able to force it to succeed based on a dynamically shifting distance in order to make the character stop.

hidden topaz
#

Hello, is there a way to make an AI Controller possess my character as soon as it gets unpossessed with the playercontroller?

uneven cloud
# hoary totem

You are getting actor of class. Which is the first one in the actor array. Where is this functionality? This is not how things should be done in a character or a component.

uneven cloud
uneven cloud
quiet fiber
hidden topaz
uneven cloud
hoary totem
hidden topaz
feral vale
#

Does anyone know how to go about creating UNavLinkCustomComponent at runtime? I tried with all the usual RegisterComponent and with world, but it doesn't seem to affect the mesh, nor does it draws debug arrows, and the ai doesn't see them

uneven cloud
uneven cloud
timid sapphire
#

Does the MoveToLocationOrActor (with pathfinding) have a max range? Trying to move an Ai a long distance (>5000) and it triggers the failed execution pin

ocean wren
#

So timelapse of someone drawing isn't a great idea, it'll basically learn the drawing pose and fixate on that

dense owl
frail cedar
umbral relic
#

I have an AI detecting another AI. Why does this return false?

#

^ whats the c_3 about

feral vale
wispy rain
#

hello. I have a problem with AI movement. sometimes (pretty rare, but it is) during "move to" node, AI is starting to slide almost in place with running animation - max walk speed is set to 650. I checked in BT and it is still in "move to" node. I checked in Visual Logger and nothing happens there. I have no idea what can be wrong

uneven cloud
uneven cloud
uneven cloud
wispy rain
uneven cloud
wispy rain
#

it is not always the same direction. sometimes they are in "move to" node and running almost in place

#

and this is rare behavior

uneven cloud
#

Is there anything they could be colliding with? Are there any AIs around and getting pushed with RVO?

wispy rain
#

no, I don't think so. I did tests without RVO and there was the same problem

uneven cloud
#

I would try to repro it with show collision turned on. There's nothing in the path following that would cause that. All the path following does is tell the movement component to move towards the next path point.

wispy rain
lyric flint
#

In AIPerceptionComponent I am calling UAIPerceptionSystem::GetSenseClassForStimulus which returns a TSubclassOf<UAISense>. How do I check if this was a sight or hearing or damage sense? Should I be casting to, for example, UAISenseConfig_Sight? EDIT: The last line is incorrect even as I read it. They are two different types. I'm stuck on needing a sense ID to get a sense config, but not knowing which sense config a stimulus comes from.

Ugh, I was calling StaticClass on the wrong class. Now calling it on UAISense_Damage, etc.

ocean wren
# fringe ermine https://www.instagram.com/p/Ca157BmjfWW/

Hmm, what you could do, is record you doing the timelapse, then extract frames via ffmpeg and use those as a canny edge value in controlnet via automatic1111 and generate using the same prompt, I thought you meant a video if someone actually doing the drawing, not the drawing itself.

timid sapphire
#

Is there a way to cancel the MoveToLocationOrActor async task?

urban warren
dark sequoia
#
  1. Spawn character, SpawnDefaultController()
  2. Controller runs all its GetTeamAttitudeTowards() with the default ID
  3. Call SetGenericTeamId() but it's too LATE!

Inside SetGenericTeamId()

// @todo notify perception system that a controller changed team ID
What do you all do about this?

uneven cloud
fringe ermine
ocean wren
urban warren
#

Hi all, i have a question regarding Crowd System.
I've made a controller which uses CrowdFollowingComponent instead of default one. But it doesn't seem to help that much for Pawns using this controller to avoid each other. Do i need to implement an ICrowdAgentInterface in the pawn class or anything else to make the characters avoid each other?

fringe ermine
iron urchin
#

Hey peeps, I wonder if anyone could recommend any good game AI related resources (not specifically tutorials) could be breakdowns, discussions? Thanks in advance 🙏

celest python
#

@iron urchin check pinned messages

sterile escarp
#

Is it possible to migrate the AI behavior from Lyra?

weary holly
#

how do you correctly "kill" an ai?

ocean wren
# fringe ermine https://youtu.be/NfGcWGaO1E4 <@152527068045770752>

Yeah, that was an interesting paper. The idea of chaining LLM calls is actually all over the place right now. Things like AutoGPT and MiniGPT and all sorts of similar things. There's even half a dozen or so LLM frameworks like Langchain now (Chameleon for instance). Basically, everyone is on board the language model train 🙂

ocean wren
dark sequoia
#

For EQS queries that are scored. Isn't a higher score the better score?

#

I'm trying to find places to spawn some units and scoring based on distance, trying to get closer to the point as a better score.

#

I would expect a scoring factor of -1 to work here. But that's picking the farthest point.

#

It's actually fairly inconsistent with what I would expect to happen. I'm generating a donut with multiple rings and it doesn't seem to matter what I put for the scoring metric, it's always choosing somewhere on the outer ring.

#

Testing pawn looks happy.

#

It appears that the data you get back from GetAllAsLocations() is not sorted as I thought it was.

#

I must have read that Result.Items was sorted and mixed them up. Thank you for your time.

weary holly
dark sequoia
#

Nope, still don't understand what's happening. If I use the scores from Result.Items, that's still not giving me the closest locations.

#

What am I misunderstanding?

crystal hatch
dark sequoia
#

If I'm using point A, and generating 2 rings of donuts between radius 0 and 100, I get 4 points in a line:
C---AB---D
A and B are at the origin of the query and I would expect both of these to have a score of 1.
Depending on whether I use 1.0 or -1.0 for the scoring factor, it gives me C or D as 1.

#

It's getting a FVector stored on the player controller that I get from the cursor hit location.

#

If I only generate 1 point from the EQS, it properly chooses that location, so I haven't dug into that being incorrect. That said, I am actively wrapping it so I can breakpoint that and see.

#

I switched the Distance2D check to use EQS_ContextCursorLocation as that seed like it was it. But now it fails entirely. :(

#

hmm, maybe my sphere overlap is being weird

#

Okay. Once I switched it over to use my location as the testing point... not sure how I missed that. It seems to work as expected.

#

I just need to figure out my collisions so it's actually finding good points, and then prevent it from generating points that would conflict with each other...

#

Thank you for the help.

ocean wren
#

Oh man, so many language model API control frameworks released this last two weeks 🙂 its hard to keep up sometimes

#

Anyone tried using the Remote Control Web API? I need to control UE externally for some AI stuff, this looks about right, but its mainly setup for virtual production

ocean wren
#

Hmm, this remote control toolset is pretty nice!

#

Doesn't expose niagara particle system user parameters though.. so no sheep flocking using this.. sad 😦

uneven cloud
ocean wren
dark sequoia
obsidian igloo
#

are there any cheaper alternatives to ue4s character movement? from what I understand the general move to for example is really expensive when you have a decent amount of AI on screen

hidden girder
#

I have disabled movement of an Ai controller using the DisableMovement() and now need to enable the movement. EnableMovement() dosn't seem to exist. Anyone know how I could Re-enable it the Ai controllers movement component?

delicate scroll
#

Hey everyone! I have a car with chaos vehicle component driven by ai controller. Once I switch controllers and posses the car by another (player's one) the car stops immediately and it take some time to get previous speed. I want to have smooth transition between switching control from ai to player and from player to ai, but without success so far. Anybody knows how to achieve that?

terse panther
#

Can we make Blackboard keys in c++?

ocean wren
#

Yes

terse panther
ocean wren
#

I forget 🙂

ocean wren
#

But aren't you glad to know it IS possible?

#

I bet you feel relieved

#

Sorry, in a funny mood today.. got interview panels all day

terse panther
keen crow
#

what exactly do you mean to make bb keys in c++? like bb types or to manually add a new bb field to an existing blackboard component?

keen crow
#

AFAIR it's doable but a bit tricky to register the new type, it might be something not overridable, I can't remember for sure

#

but if you use a custom engine then it shouldn't be a problem

celest python
#

its possible afaik

#

i dont remember how either though

celest python
terse panther
charred lava
uneven cloud
# terse panther new bb key type

To create a new BB key type, you just need to make a new class with a parent of the blackboard key type. I would look at one of the existing ones to see all the functions you need to support.

dark sequoia
#

I'm a bit confused by the EQS Overlap test. I'm generating points on nav mesh around a point and I want to make sure none of those points overlap with pawns. But nothing I seem to do causes points to fail. I haven't been able to find much in the way of EQS documentation, other than a million tutorials on how to make AI hide from the player. :/

terse panther
supple oar
#

Hey, does anyone have experience with shipping a multiplayer title that uses GAS with their AI? We're doing this with our current title, but have received some feedback from partners that other teams have run into network and CPU performance problems when using GAS with AI. Would love some insight.

ocean wren
arctic barn
#

When I use AiMoveTo with a regular AiController, it works fine, but as soon as I switch to a DetourCrowdAiController, movement breaks completely, and the result keeps returning "Aborted". Does anyone know what is going on?

blazing prairie
#

This is a dumb question most likely for many, but if some one could guide me on resources / courses by which I can learn Unreal Engine AI in depth !

Have gone through almost every YouTube videos including one those of UE too, but seems there is nothing much to gain !

uneven cloud
keen crow
sonic cobalt
#

Hey folks, I have a weird issue where my enemy has a PawnSensing node, but OnSeePawn triggers when the player pawn is way outside of the cone. Only Detect Player Pawn is enabled, and when this detection happens at this distance, it only sometimes triggers the event, not consistently. Any ideas why the range here is wrong (I'm not setting the Sight Bounds in code or anything)?

unique fern
#

Any idea why my behavior tree would be skipping directory over the Wait node in this example?
When the BT runs, the wait node flashes and then the next node in the sequence immediately executes. I changed wait duration to 30s and it hung on the wait node for about 3 seconds before moving.

#

But if I do it like this it apparently works fine? BT can't start with a wait node?

ocean wren
ocean wren
#

Balls, not the open source model though.. stand down

hasty pumice
#

ai only working for my one character and not the other actor that I placed in level

#

sharing same behaviour tree

autumn sluice
#

Has anyone managed to bind to a data asset value from a State Tree condition? This variable comes directly from a Data Asset value that is indeed populated prior to runtime. It crashes with a InstancedStructArray invalid error

#

If I retrieve this value manually instead of a binding, it works fine

floral brook
#

Hey guys, do you know if there's a place I can check the reason behind a failed navlink?

#

Mine seem to show up on the Draw Failed Nav Links debug draw but not on the regular one. They seem to be failing for some reason and I need to figure out why

#

Got these responsible for jump pads, and they seem to be the main culprits

floral brook
#

issue was resolved. Unreal does not support navlinks between different tiles. Increasing the tile size to 10000 fixed my navlinks. Hopefully things won't break

floral brook
#

Things broke

gleaming star
#

alrighty, about to embark on creating a great enemy AI

#

im 2d pixel art but in 3d world

#

anyone have any suggestions?

dark sequoia
#

don't make it bad

#

without any context or goals, there's not much to suggest

umbral relic
#

I have a MoveTo in behaviour tree but my AI just instantly skips over it all the time

harsh storm
#

Most common issue is your navmesh isn't present

exotic veldt
#

is there a way I can bake navigation onto an object? Im trying to move my ai character relatively on a moving ship but attaching a navmesh is almost impossible and it doesnt seem to update. But if i could somehow bake it onto the object and then attach it wouldnt that work? Any info would be super helpful! 😄

soft mantle
#

Does anyone know if there's some model around trained on Niagara system for VFX creation?

shadow furnace
#

I don't know why people talk about deep learning models in here completely unrelated to the unreal AI framework

#

I guess there's an unreal AI learning model on main

soft mantle
#

oh, I tough it was more general to AI, ignore it then : P

shadow furnace
#

I mean, no harm done I guess

ocean wren
#

Why do you think deep learning isn't applicable?

#

I mean, Epic are using it a teeny tiny bit themselves

open holly
#

For making a racing game with AI and a lot of verticality, is navmesh practical or is it better to use splines?

I want the AI to be able to use shortcuts / branching paths like Mario Kart but not sure how to accomplish that with splines and Navmesh volumes seem to have trouble with Mount Wario esque maps with what I currently understand about implementing navmesh.

Any good resources on this subject?

ocean wren
#

splines for sure

#

although maybe you could use navmesh to constrain them

#

Make yourself a spline graph

open holly
#

First time hearing of a spline graph. I'll dig into that. Already have a spline running through the map for checkpoints so it's going to be getting a lot of use it sounds like.

ocean wren
#

Yeah, personally, I'd make myself a toolset and a pathfinder for sets of splines connected in a graph

#

You can basically copy the spline editor and repurpose it for graphs of splines, although thinking about it maybe the mass traffic zone stuff could do it? I haven't looked

#

There's a zonegraph editor, maybe you could use that?

lucid crescent
#

hey guys, I'm quite not understand how AIMoveTo works, it seems that AIMoveTo is running even if task, that uses this function, finishes. I was expecting that AIMoveTo would finish moving when task is finished, is that wrong?
Basically in the debugger, I can see that the task is not firing, but npc is still moving

patent hornet
#

i do recommend spawning a MoveTargetActor, then moving to it, once, with GoalTracking enabled from outside BT

#

then you just teleport move target, and AIControllers have a delegate they fire when the move is completed

#

then you don't need crazy parallels to do move + shoot for example

lucid crescent
#

okay, thanks, will look into that

slow sphinx
#

Anyone know why logic inside Behavior trees seems to be the complete opposite of what would actually make sense?

#

I am curious as to why I would need to Abort Normal Logic if the Player is not seen in order to get it to actually abort it when the player is seen....I fail to realize how that could possibly make one lick of sense

#

The condition on the left will abort when PlayerSpotted = True

#

in order to get it to abort when PlayerSpotted = True I had to tell it to Abort when PlayerSpotted = False....unless Not Set = True in this Backwards place

#

This is probably the Most ridiculously confusing part of Unreal...It's bad when you can't tell if True is False or False is True

uneven cloud
harsh storm
#

is is Not Set == False is is Set == True

uneven cloud
versed maple
real arrow
#

has anybody managed to get run behavior node to work

#

I have tried 3 seperate times and failed everytime to make it work

sterile escarp
#

Hey does the «Focus» node always make the AI’s mesh face the player mesh? I have a third person shooter and the camera is slightly on the side of the character.
This makes the AI miss all its shots because its looking at the player.

The focus node should make the camera look at the player, not the mesh. Does that make sense?
How can I fix this?

#

The gun is shooting from the camera, not the center of the character

lucid crescent
cinder condor
#

I have an AI based on SO (at a certain time, the agent goes to an SO and uses it). I need to adjust it so that it can support dialogues in 2 ways:

  1. During the action it is performing, as a parallel action.
  2. While the Agent is moving towards the designated SO, I need to be able to stop it and initiate a dialogue with it, then it should resume it's task.

Any suggestions how I should go about this so I can easily implement it? (Keep the dialogue logic completely separated and only have some flags to interrupt the BT, or somehow have the dialogue logic in the BT as well or such?)

misty wharf
#

I don't know if plain BT can easily achieve something like this

#

I think you'd need to have some kind of system of "tasks", where you can define a task like "go to SO"

#

Then your BT executes the given task for example, and if it gets interrupted, the active task is stored somewhere, and can be resumed later

cinder condor
#

I see that's an idea

#

I do have something similar to that in the sense I have a goal generation system

#

I still think I should keep the dialogue system completely separated, shouldn't I ?

misty wharf
#

Yeah that seems like it would make sense to me

slow sphinx
#

But yeah I was getting confused, I was under the impression that the Abort was tied to the Condition

scarlet wave
#

Hi, anyone has an idea why an AI move to fails in a packaged build? it works perfectly in the editor, the nav mesh is correctly build in the packaged build.

uneven cloud
frozen wagon
#

Hey, quick question on best-practices: I'm learning to implement AI with State Trees. In my experience with UMG, variable binds are virtually never used because they call on every frame and can't use getters. Binding in State Trees seem to be pushed pretty hard, though. Is it best practice to actually use the binds? Updating variables on a per-event basis isn't very intuitive with the current presentation.

lyric flint
autumn sluice
#

So I'm playing around with State Tree, and I'm trying to figure out if this is a bug, or intended behavior. If I have a single state that is part of a parent state, neither its Success or Fail transitions will fire. It will remain stuck in this state forever. If I add a child state with literally anything in it, the state works perfectly.

#

If I remove WHY, this state will never progress

cinder condor
ornate pagoda
#

Hey guys any idea how to make the decorator note called "cooldown" in the behaviour tree an Blackboard key instead of a float?

gleaming star
gleaming star
# dark sequoia without any context or goals, there's not much to suggest

Fair point. Im just trying to start simple w w basic enemy. Think like blobs in legend of Zelda. Simple movement but thry do the basics. Move toward players within range, and having an attack. The idea is to make this simple enemy be performant enough to be able to have say like a wave based moment where potentially 100 couple be spawned

meager hollow
#

Hey everyone, I'm working on a little side project where AI should avoid the light. I am dipping my toe into EQS but I see that there isn't any options for light or at least as far as I know. Is there a way to make a trace and make it test the luminosity?

As a side node, i'm a complete noob in c++ and I see that custom EQS test can only be made in C++. Is this something I can get into or am I getting myself into a massive headache?

Anyone who can point me in the right direction or has any suggestions?

dense owl
scarlet wave
#

Hello again people, I'm having a problem where the supported agents nav meshes are not being exported, except one, when packaging the game, I've been looking around in project settings and in the nav mesh and there is nothing about packaging, this causes the different sized npcs I have in my project to not move, this works perfectly inside editor and only happens in packaged game, anybody knows how to fix this? Thanks in advance!

meager hollow
# dense owl You could try putting a box collision around the light that only the AI can coll...

Yeah that was my first thought too. But it doesn't really deliver the results I'm looking for.

In my project you can create lights and connect them to a generator. You as a player are in darkness and the light is kind of a weapon against these creatures in the dark who lurk and watch you from the dark.

I got the lights and the generator going but with just a simple collision sphere they walk around the boundaries. I want them to look for a place to hide from the light. Kinda like a raytrace from the light, looking for a place where they are not visible. That's why I thought a EQS would work great. But that was another dark rabbit hole I'm jumping in now.

timber plaza
meager hollow
uneven cloud
meager hollow
uneven cloud
uneven cloud
gleaming star
#

i would imagine an NPC (quest giver or something) would be less of an issue rather than an enemy that moves toward you to attack?

#

im also using 2d pixel art for main characters inside of a 3d world

uneven cloud
meager hollow
gleaming star
#

in my case, im just using pixel art that would flash frames when moving ect

uneven cloud
gleaming star
#

I’m going to attempt to make a simple enemy w 2D logic and see what happens

#

How do people do wave based shooters/killing ect where 1000s of NPCs spawn in your opinion?

uneven cloud
uneven cloud
dense owl
# meager hollow That's Okey, I'm not looking for more then 3 enemies at the time. I want a scary...

Did you watch this? https://youtu.be/iY1jnFvHgbE

In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.

By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...

▶ Play video
uneven cloud
gleaming star
#

i trust your conviction

gleaming star
#

like how do i check to see whatis doing what

uneven cloud
gleaming star
#

are there certain numbers as a solo dev, i should look out for ?

#

like max / reason size map's per item / scene? a good base meter to watch out for bascially

#

i mean, i can feel when i do soemthing bad when i press play, but also nice to know the digits

meager hollow
dense owl
uneven cloud
gleaming star
#

appreciate the help tho

uneven cloud
gleaming star
deft sedge
#

I'm having a weird issue in 5.1

this task succeeds as I want, but for some reason the next task is never executed

#

the eqs query just seems to never fire

#

all this worked in 5.0

#

can see the first task even set's the correct blackboard key

deft sedge
#

hmm seems the behavior for abort self has changed

meager hollow
weak flower
#

Hi all.So I want to make a horror game with the monster being an a.i which can chase, attack, roam and investigate(players last position) and i also want it to have good hearing so i was wondering if i should use utility a.i or behaviour trees?

ocean wren
#

Either would work

opal swift
#

Can i use a dectorator to see if a vector is set / unset? seams to me like 0.0.0 would be a valid vector. so that doesnt work right?

misty wharf
#

Correct. A vector cannot really be "unset" because it always has some value

opal swift
#

yeah so i would need a boolean to go alongside with it then

gilded tree
#

How can I have my AI actors rotate towards the player even during a rootmotion animation? I tried enabling ‘Allow Physics Rotation During Root Motion’ but that did not do the trick as the AI is not using MovementInput, but rather AIMoveTo from behavior tree.

uneven cloud
uneven cloud
uneven cloud
dense owl
#

hey, is the step at 12:00 in this video still necessary in 5.2? https://youtu.be/iY1jnFvHgbE

In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.

By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...

▶ Play video
gilded tree
elfin sonnet
#

I am trying to use the new AI State Trees instead of Behaviour Trees, but I can't find a way to debug the flow. Is it really not possible at the moment to visually debug the State Trees? If not, I guess I will stick with BTs. So, is it possible to debug State trees?

harsh storm
#

Nope, not in the same way there is as BTs

#

Need to use the visual logger

hallow gazelle
harsh storm
dense owl
#

Yeah I read the docs and even on 5.1 it still has the same note saying you have to use tags if you want to check friend/foe in blueprints

steady phoenix
deft sedge
steady phoenix
#

Ah I see, I think I tried self and it didn’t do what I needed. But I need to revisit

deft sedge
#

another thing was that some sequence nodes wouldn't finish without a wait node added to the end

#

i have some tasks that call into interfaces and I just wasn't getting finishes or something

steady phoenix
#

I had an issue where nodes where being excited twice, didn’t happen in 4.27, 5.0, same project in 5.1 now suddenly everything executed twice, really frustrating

deft sedge
#

yeah something changed from 5.0 to 5.1

narrow plover
#

Does someone have experience with vehicle AI plugin from 313 studios and AVS ? Everything work fine when I'm driving my car manually so my problem is not from AVS, but when it is possessed with the AI controller (provided by the vehicle plugin and with same settings for custom vehicles that they are showing in their youtube channel) my car is flying like a bird. Any solution ? (I'm using UE4)

limpid rock
#

Haya folks, does anyone know how to access the values for AI sights etc?
Im trying to set it up as a variable so that I can customize my AI further (e.g set custom sight radious range/lose sight radius)

opal swift
misty wharf
#

That's interesting, I knew the BB values are wrappers around the actual values but not sure how it actually represents it as valid / invalid

opal swift
snow fiber
#

@shell sable I've set up the Nav plugin from the link you gave me - https://github.com/chillpert/DonAINavigation but it's giving me the same behavior I know from the other plugins. I can see the "Fly To" task getting used but I don't see any input on the CharacterMovementComp of the character I created and thus the Bot isn't moving; I'm PrintStringing the last input vector from the comp every frame to see that. I assume I need some kind of component that acts as glue between the plugins task code and the MovementComp, but I don't see where that happens in the basic example from this article: https://erlangen-sheppy.medium.com/3d-pathfinding-in-unreal-engine-9b04f58ca50c

Any pointers? Is that article even correct anymore?

GitHub

This plugin provides a 3D dynamic pathfinding system for use with Unreal Engine 4. It's primarly designed for Flying AI creatures based in dynamic or procedural worlds that need to solve co...

Medium

It doesn’t have to be difficult

#

FWIW I also don't get any visible debug output, like nav volumes or anything in the level when I enable the debug output flags in the BT. I'm also wondering if this has nothing I need to place in the level, like a global nav volume or somesuch

dark sequoia
#

morning

dawn schooner
#

Hi! I am once again asking about State Trees 😄
Currently, it seems that the only way to deal with async tasks is using tick events (on the task) that check for x conditions and then set the return value to running, succeeded etc. Is there any other way to do async tasks? It is a common usecase and checking on tick seems like an unnecessary performance overhead

#

I'm mostly using blueprints but I can dive into C++ if it is less buggy/easier to setup there

harsh storm
#

I don't know of any async functionality. Tick goes brrr

#

like an unnecessary performance overhead

I'm mostly using blueprints
Bruhhhhh

dawn schooner
#

it seems that ST tick is not the same as actor tick so maybe it's way faster, idk

#

or at least it depends on the logic you put on tick

harsh storm
#

As per usual

#

But in all honesty - I really don't recall there being any async functionality like you're looking for.

dawn schooner
harsh storm
#

ST was too buggy for me to continue with it.

dawn schooner
#

I had 2k state trees and it seemed to run fine, so that tick shouldn't do much afaik

#

bcs the alternative is to make a very simple st-like system that runs on async

#

but that's quite a lot of work maybe

dawn schooner
harsh storm
#

Yup. Went back to the tried & true.

#

New & shiney was preventing me from actually making progress in the AI department.

dawn schooner
#

yeah makes sense

harsh storm
#

The big thing that broke for me was when the bindings just decided to stop working

#

So I was just like, "Eh - maybe another version I'll try" 😅

dawn schooner
#

I love the idea of state trees but it's difficult to tell how it works, I cannot control them to the extent I might need, and if it's running on tick it might be a problem

harsh storm
#

I wish I would've actually wrote the blog that I said I was going to back when I was messing with ST far more frequently.

dawn schooner
#

hahahaha

#

yeah

harsh storm
#

But I've since forgot some of the inner workings 😅

dawn schooner
#

but if it's buggy and slows down work, it could actually be a problem

#

idk if 5.2 might bring something new to the table

harsh storm
#

For what its worth - it was mainly the editor portion that was buggy in my experience.

dawn schooner
#

yeah I see

#

I mean

#

it seems that even returning certain states from leaf states is not working so

harsh storm
#

BT: "Come back to me my child"

dawn schooner
#

ye but probs BT are even slower for my needs

harsh storm
#

Wonder how much you can make BT go brr if you don't do any instancing 🤔

dawn schooner
#

no idea

#

but I doubt I'm gonna even try

harsh storm
#

Well Max, you've been volunteered

dawn schooner
#

xD

harsh storm
#

No BP tasks or anything like that. All C++. No instancing allowed.

dawn schooner
#

right now I'm leaning towards rolling our own lean stuff

harsh storm
#

Let's see how brr it can get

dawn schooner
#

xD

harsh storm
#

Most people do a lot of tasks in BP (from what I've seen) and then claim BP is slow.

#

But according to Luthage, instancing the task is what is really killin' the performance.

dawn schooner
#

I see, I have no idea

#

but judging by Unreal's performance standards, and the age of BT

harsh storm
#

And according to @celest python - BT is overoptimized 😅

#

Well...AIModule doesn't do things the same way as the rest of the engine 😅

dawn schooner
#

I can predict that it's gonna be too slow for what I need

dawn schooner
harsh storm
#

Depends on your needs I guess.

#

They do some memory shenanigans

dawn schooner
#

mmmmmmm

#

idk too much unknown

celest python
harsh storm
#

Yeah - that's true, but Max deals with a large scale; so spawning will be the bottleneck in this case

dawn schooner
#

indeed

#

I'm doing some tests on ST tick just to see how impactful it is

#

I was thinking about rolling our own stuff but it feels like such a big undertaking, even if it is a lean thingy

#

I think anything below 1ms per frame is quite acceptable

celest python
#

BT instances objects while ST instances data

#

so ST would be better

dawn schooner
#

yeah

#

but it seems tasks tick by default and async behavior is tied to tick

#

having another tick for 2k entities (taking into account that Mass is already iterating multiple times and also actors have their aggregated tick for now) might be too much, idk

harsh storm
#

Just don't have AI

celest python
#

arent you calling ST tick function from mass?

dawn schooner
#

no

celest python
#

why

dawn schooner
#

I'm using ST component on actors

celest python
#

why 2x

dawn schooner
#

mainly because we only use Mass for movement, actors still have most logic

celest python
#

AI definitely needs to be on mass scope for an RTS

#

empty UActorComponent ticks alone is already a bloat for you

dawn schooner
#

yeah indeed

harsh storm
dawn schooner
#

the problem is that we need actors, there's no easy workaround (for GAS for example)

celest python
#

why you need GAS for an RTS

dawn schooner
dawn schooner
celest python
#

if you decided on RTS on scale you should also consider writing custom systems/tools for those instead of GAS though

dawn schooner
#

I'd not use actors etc if I started from scratch, but half of the basic game was already made when Mass came out

#

we'll modify GAS, but for the moment there is nothing inherently bad about GAS besides the networking model

celest python
#

GAS will interop with NPP it seems

#

I wouldnt ever use GAS though, its not like it can also replicate 2k entities if you were also doing multiplayer

dawn schooner
#

we are

celest python
#

ST tasks should be abilities and combat graph itself

#

how do you plan to replicate 2k entities?

dawn schooner
#

fast array serializers and ASC proxies, it's already studied xD

celest python
#

how about CPU cost of replication though, not just bandwith

#

UNetDriver tick go brr

uneven cloud
dawn schooner
#

and the good part is that the GAS stuff is really less frequent and intensive than movement replication (which is already kinda done)

celest python
#

well yeah I tend to hesitate to say something about those things when it comes to RTS + replication combo

#

one way or another it will involve a huge engineering job to do

#

since you're fighting the engine

dawn schooner
#

yeah it's always harder but

#

fortunately there's people that have already done some of it

#

Fortnite already uses GAS proxies, and I talked with somebody with 400k entities using GAS for them, and a similar trick

celest python
#

I dont know how GAS proxies work but I know its just a fancy lazy loading trick

#

it also relies on dedicated server and previously that grid based networking thingy

#

so I guess it could work with RTS too, why not

dawn schooner
#

idk exactly either, but it's mostly about disabling regular replication and using a different one

#

so basically ASC does not replicate normally and the data is replicated through other means (FastArraySerializers for me probs) and re-wired into GAS on clients

celest python
#

there is only one game released with client-server model and large scale RTS though

#

all others are lockstep

#

so can't say that idea is battle proven

uneven cloud
#

Mass can also use actor representation, where most of the functionality is still driven by Mass, but an actor is attached.

dawn schooner
#

there are more client-server RTS games though

harsh storm
#

Do you even actually get the benefits of Mass at that point?

celest python
#

i might be wrong, I've read an article about it a year ago or so that explains a game where they claim its the only large scale RTS with client-server model

dawn schooner
dawn schooner
celest python
dawn schooner
uneven cloud
dawn schooner
#

actors are not slow

#

skeletal meshes, CMC, and other stuff that is usually associated with actors is

uneven cloud
#

Actors are still slow. Just not AS slow.

dawn schooner
celest python
#

well thats all about actors

#

transform, tick, replication

#

all three are slow

dawn schooner
#

also the problems of non being able to multithread them

dawn schooner
dawn schooner
uneven cloud
#

Slow is relative. Actor components are slow. Many games don't have to worry about it, but some games do.

harsh storm
#

But I need my 10k zombies 😭

dawn schooner
uneven cloud
harsh storm
#

Dead Rising is going to look like child's play

#

I do wish the Dead Rising team made more public how they did what they did.

#

I just assume it is instanced skeletal meshes and client-auth networking

uneven cloud
#

I doubt it's client auth networking, but maybe they did really bad things to do that.

celest python
#

there is actually a GDC about that, where they explain their low level systems

harsh storm
#

Well Eren linked me some stuff awhile back, it was client auth

#

They just didn't talk about how they achieved the zombie counts.

#

It was P2P as well

harsh storm
#

They did say their tech could scale to like over 20k zombies or somethin' like that...way back in either 06 or 09. Don't remember if it was about Dead Rising 1 or 2

celest python
#

they heavily rely on behavior LODding

#

not all zombies replicate everything

harsh storm
#

And simple skeletons

celest python
#

instanced skeletal meshes are probably not rocket science, i think engines designed with such mindset can achieve it easily if you have graphics programmers

#

early 2000s games was doing it

dawn schooner
#

yeah

#

it is mostly about calculating the animations on the GPU

#

instead of CPU (as Unreal does)

harsh storm
#

It's more common to calculate on CPU as far as I know

dawn schooner
#

what might be tricky (not sure) is handling stuff such as collision with GPU-based animations

#

like, how does the game logic know if you hit the head or not

celest python
#

game state in games like dead rising and europa universalis mean something different than UE

#

its actually the state of the game

harsh storm
celest python
#

so P2P games sync that state and yolo

#

no OnReps

celest python
#

UE's mesh pipeline heavily focusing on fidelity rather than quantity

#

all data structures based on that mindset

harsh storm
celest python
#

and for foliages etc. there are hardcoded monolithic codes on private files

dawn schooner
harsh storm
#

Everytime I pick it up, I put right back down and am like, "I need to work on my game"

#

I don't need 10k....yet

dawn schooner
#

I am lucky I get training time on my job

harsh storm
#

The dream

dawn schooner
#

it's not reliable time, because it depends on my work schedule, but at least I get encouraged to do it

#

and I got free Udemy which is something

celest python
#

enough slackers for me, bye people bye

dawn schooner
#

the problem is that I barely have stuff to implement regarding graphics programming

#

and I don't learn without challenges

#

ughhh state tree overhead for 2k units is not nice

#

back in CPU-bound land

#

2.5ms for 2k state trees

#

that was in blueprints, let's see what happens with a C++ task

dense owl
#

pc will explode 💥

dawn schooner
#

going from 80-90FPS to 50-60

#

just due to the empty state tree component overhead

dense owl
#

Were you the one asking whether you should go back to using BTs?

dense owl
#

Is it less expensive ?

dawn schooner
#

Idk, I don't think I'm gonna test it

#

I'm playing with the tick frequency and see if it is of any help

#

since I don't need it to tick super frequently

stuck sentinel
#

hi there.
I'm having a slight difficulty with path finding in unreal, and as I'm a noob in unreal in general ( more even so in their AI part ) I'll ask you guys.
This is not my code base, so a lot of stuff here isn't EPIC's stuff, it's the company I work for.
I have to move a pawn from A to B.
I have this line at the beginning of the code:

PathFollowingComponent->OnRequestFinished.AddUObject(this, &ThisClass::OnMoveRequestFinished);

but I guess this MoveRequestFinished is not triggered when the move is finished, but when the AI finishes calculating the path?? is that it?
the reason I'm taking this guess, is because inside that function, I'm trying to make some decisions about which path to take. So I make another call to the AIController::MoveTo with a different destination.
If I don't like some aspects of that path, I make yet another call to AIController::MoveTo, and for some reason, I find that I just reentered OnMoveRequestFinished! I can see the two calls on the call stack.

So my question for you is, after reaching my destination, I have a few destination points to choose from, so I should probably request some paths. But the way I'm doing it, doesn't work. How should it be done?
Thanks.

dawn schooner
#

Just as a followup on my state tree research, I'll just lower the tick frequency of the ST component (10 times per second seems reasonable) since I'm only using tick to set the state from async tasks

#

maybe I can hack something in the future when the tick is disabled and called manually on events or smth

shell sable
# snow fiber <@889623698976440360> I've set up the Nav plugin from the link you gave me - ht...

you need to add a "don navigation manager" to your level

check out this tutorial video https://www.youtube.com/watch?v=6Tr_K551zvI

DoN The Nature Game uses a 3D pathfinding system for it's flying creatures to navigate a dynamic and procedural world.

Now this plugin is available for free to all Unreal Engine users!

Download the plugin, sample project and source code here:
http://www.drunkonnectar.com/3d-pathfinding-ue4/

Forum thread:
https://forums.unrealengine.com/showth...

▶ Play video
stuck sentinel
#

sorry, I can't just add stuff to this. It's work, not my personal project

stuck sentinel
#

basically, I have a set of points for which I set a route. Patrol points. but I want to check, when I reach a patrol point, if the path to the next node is too far or not. If so, skip it.
so, I have added a bit in OnMoveRequestFinished, when it fetches the next point, asks for the path, gets the length, if bigger than X, fetches the next point, and asks for path. and here is where it breaks. I Guess I should probably do this somewhere else? Or develop a kind of state machine?

uneven cloud
stuck sentinel
#

this is not my code. I am trying to adapt it to do this. I've never touched unreal's path finding

#

so, basically, a path is asked from A to B, and when the path is finished calculating is calls OnMoveRequestFinished? or is it when the move there is finished?

#

and what do you mean testing the paths without requesting one?
The problem here is that I may use something to block a path, eventually, so the patrol must adapt. It's not the most frequent thing, but it must be taken into account.
So my idea was, most of the time, it'd just request a path to the next patrol node, and follow it. but sometimes, that path may be blocked by something, but UE's engine does not tell me that. it simply provides me with a longer path around the obstacle. So, I'm trying to find if that longer path is TOO long ( so it doesn't seem silly ), and if so, just skip that waypoint altogether.

uneven cloud
stuck sentinel
#

ok, so in my code, assuming I don't move, I shouldn't get a second call....

#

hmmm. unless....

uneven cloud
stuck sentinel
#

navigation system? I'm a noob. what do you mean by that? I need my soldier to find a way to get to that waypoint. is there an alternative to the AI to get A* to calculate a path?

stuck sentinel
#

ok, if this is available, why would one use AIController instead of navigation system to move a patrol from A to B?

#

any reason you see?

uneven cloud
#

Using the AI controller one isn't just finding a path. It's finding a path AND moving towards it.

stuck sentinel
#

hmmm, ok

uneven cloud
#

You want to test a path BEFORE moving towards it.

stuck sentinel
#

it sets the whole action queue for me, then

#

yeah. so using navigation system to test the paths, and when one is ok, pass it on to the AI to control the pawns

uneven cloud
#

Sure.

dense owl
#

is there a way to make an actor invisible to AISense, or if not, a way to force the AISense to move on to the next actor in its sight radius?

#

I'm using a decorator currently to check for specific classes, but the AI gets hung up on targeting the camera and mostly ignores the rest of the actors

balmy raptor
#

Hello I will pay anyone $10 if they help me with a simple ai blueprint script. So I have an ai script to move in a straight line for a random time and stop for a few seconds and then move to a random direction again. what i need is:

  1. when its paused few a few seconds and choses its random location again, it slowly turns to the random location during its delay time.
  2. every so often (maybe around 30 seconds to a minute or so), the ai will go to a random specific location of any of lets say 10 different locations i initially select. and then after it goes to this specific location, it will go back to doing its basic random direction code.
lyric flint
#

Use SetFocus/FocalPoint for 1, and use a timer with an array of locations from which you select randomly for 2.

balmy raptor
#

this is what i have right now

lyric flint
#

No one has to be updated repeatedly while the other doesn’t. (I can’t remember which is which.) Just use the one that works best for you, or use SetActorRotation too is an option.

balmy raptor
lyric flint
#

Use one of those functions and the tick event or a timer if you want. You can repeatedly set the rotation based on the time elapsed so far and the angle to the place you want to look.

balmy raptor
#

because i dont have code right now for the ai to get its rotation but i have it to get a new location

lyric flint
balmy raptor
#

however when the ai turns in his video, it doesnt do it slowly

#

it just sets the new rotation and goes

#

doesnt take its time and then go to the new locaiton

dense owl
#

Also I think when it comes to AI they have a rotation speed setting already

lyric flint
#

It doesn't do it instantaneously. It is called on Tick in the UpdateControlRotation of the AIController. I can't remember the name of the variable, but I imagine there is a rotation rate on the character movement component.

dense owl
#

There is a turn rate setting but I just checked a link and it said the unit still moves, it just slowly turns the mesh to face the fwd vector

#

So maybe just rotate it manually using event by timer, and then give it the move order

#

As for your patrol, you could use behaviour trees and EQS. Watch this video: https://youtu.be/iY1jnFvHgbE

In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.

By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...

▶ Play video
oblique basin
#

Yeah you'll want to rotate in place first, then set focus. If it's AI, you can make a BT task that disables movement, rotates player in the BTTask tick function using the RInterpTo node (note: the interp speed argument = 1 / value * 1 second, so 2.0 = .5 of a second), then reenables movement and sets focus.

brittle trellis
#

Any idea why my BT is stuck in this Task ? It was working perfectly in UE4, this started happening in ue5

#

no matter what I do, "Abort" , "Finish Execute" , Any Observer abort, still the same

oblique basin
#

As we have no info, it's hard to say. I will say the one big change from UE4 to UE5 was the default abort condition changing from "both" to "self". Try changing your aborts to "self" and see if that fixes it.

narrow plover
brittle trellis
#

let me know if you need smthing else

narrow plover
#

Are you sure it not hit at cast failed and keep stuck here?

#

Make a breakpoint at your cast node

brittle trellis
#

but yet still stuck

#

I even created a new task that has 1 print and 1 finish execute, still same issue

brittle trellis
oblique basin
#

What if you tried removing the empty selector and having an arrow point directing to the node. An empty selector is essentially the same as a "true" condition if the parent is a selector.

brittle trellis
oblique basin
#

If it's reaching the node, it's because the conditions are returning true. All you can do is debug each decorator and figure out why it's returning the value you don't want.

#

I wouldn't get too hung up on 4->5 changes. If you make the choice to upgrade mid-project, you'll always face these issues.

narrow plover
#

Did you check manually the distance for "IsAtLocation" ? For the first path you can check it
For the second path, it's clearly your second BBC who is returning false and not meet the condition so it will never entering in that BTT

steady phoenix
#

When using Move To Actor with a goal set, is there anyway to reduce the amount of times it recalculates when said actor is moving?

#

Or is it best not to use goal oriented move to

brittle trellis
frozen wagon
#

I am not sure how to make StateTree tasks implemented in C++ show up in editor Blueprints. The Debug Text Task and Delay Task included with the StateTree plugin are implemented in C++ as UStructs inheriting from StateTreeTaskBase

//Draws debug text on the HUD associated to the player controller.
USTRUCT(meta = (DisplayName = "Debug Text Task"))
struct STATETREEMODULE_API FStateTreeDebugTextTask : public FStateTreeTaskCommonBase
{``` 
When I make my own custom StateTreeTaskBase struct in a project, it does not appear as an option in any State Tree editor blueprints. If I create a custom StateTreeTaskBlueprintBase class, it does show up in the editor, but the comments say that this class is for Blueprint tasks so it seems like not the right way to do it. Could anyone with experience implementing C++ ST Tasks point me in the right direction?
frozen wagon
#

The answer is that it needs to be a StateTreeTaskCommonBase, not a StateTreeTaskBase.

dense owl
#

it doesn't seem like any of my print nodes inside BTTasks are actually able to print to screen. Anyone know why?

#

like the code is flowing through them, they just never actually print to screen

hearty niche
#

How did people use static navmeshes with World Composition in UE4? From what I read on UDN navmeshes cannot be streamed in separate parts yet.

dawn schooner
lyric flint
lyric flint
dense owl
#

Hmm maybe, I’ll try to figure it out later

gilded tree
#

Using BT, my AI finds enemy actors on perception update, and before I initiate an attack montage I set the focus to the actor

The issue is that the AI seems to -some odd times- in that moment not return a percepted target, and turns towards 0,0,0.

Any suggestions that come to mind? 🤔
While table ducking this text I realized maybe a custom set gameplay focus could solve the issue? 🤔 As a service for the montage task.

snow fiber
#

@shell sable It's moving now! Thanks for the tutorial. Plugin has crashed my editor twice already though, has it been crashy for you too?

uneven cloud
uneven cloud
unkempt pulsar
#

When I use Stop Logic then Start Logic, the behavior tree refuses to enter this blackboard based condition despite the TargetActor being set.

#

Like is it a known issue that stop / start logic breaks blackboard based conditions?

uneven cloud
unkempt pulsar
#

I found a workaround to this problem, instead of using Stop / Start logic I've just created a bool "IsBehaviorTreeActive" at the root of the behavior tree, now it works like a charm

#

Before the workaround I tried to do some debugging where it was as if the leftmost node (Blackboard Based Condition) didn't exist. The breakpoint only stopped on the rightmost node, and before that it kinda entered the middle selector where it said it failed... Anyways I gave up

gilded tree
uneven cloud
gilded tree
#

Okay, I’ll have to explore that then 🤔 Have it move to the last known location or something like that

gilded tree
hearty niche
stoic fern
#

hello guys.. I want an object to move with a behavior tree to a specific location, stop using the behavior tree so it can use a spline path there, and then continue with the behavior tree .. do you know any sort of way to implement this?

dense owl
#

And then RestartLogic

soft sinew
#

Is it possible to search all the behavior trees in a project for a particular task, decorator, service (or reference to a bb key within one of those)?

uneven cloud
stoic fern
uneven cloud
dense owl
#

It’s just a timeline node right?

stoic fern
# uneven cloud Why can't you?

well i am trying but it doesn't do it and it continues to execute other tasks or it goes idle in the root node while it tries to begin the spline

gilded tree
#

How does an AI task actually receive an EventReceive AbortAI? In my usecase I run a delay on the AI code while they're animating, but if they're dealt damage to they should just use the delay from the hit reaction animation. Instead, what's happening now is that the animation that was currently playing while it took damage, is using a delay until the next logic can play, i.e attacking again.

#

Do I need a decorator on the Montage Task, which checks if the AI has been damaged? 🤔

uneven cloud
uneven cloud
gilded tree
#

What would be an alternative to ensuring the BT doesn't continue playing until an animation montage has completed then?

uneven cloud
#

A timer. A delay is a timer you can't cancel, which is the problem.

gilded tree
#

Hmmm, sounds like a solution indeed 🤔

uneven cloud
# hearty niche Any pointers as to where. The world partition one is unstable and we are looking...

I think it might have been removed. The oldest entry is from 2018 and that post was older.

  1. Make sure there is a nav bounds volume in the persistent level. You can have them in the sublevels, but if there isn't one in the persistent level, it won't build. It just needs to exist, doesn't have to be around anything.
  2. Load all sublevels
  3. Delete any recast actors
  4. Make sure the persistent level is set to the current level
  5. Build navigation
celest python
#

That sounds.. Bad 😅

#

But I guess there wouldnt be any better solution

uneven cloud
#

It was not fun. A lot easier when you make a commandlet and have the build machine do it.

#

The worst part is when someone is working in a sublevel and they have auto regen navigation turned on. It'd break navigation for the entire level.

stoic fern
#

somehow i managed to fix it! thanks @dense owl @uneven cloud

timid juniper
#

Hi, i'm having troubles with my AI enemy, it detects me but it doesn't follow me as intended. I'll post my blueprints and other stuff here since I've been stuck for days now

soft sinew
#

BTW the answer to searching for usages of a task, decorator, or service in the behavior tree assets was to use JetBrains Rider's UE integration

dense owl
#

so weird, today the print inside my BTT is working

#

wasn't until now

#

and I didn't change anything there

dense owl
#

actually it works intermittently. I think the AI profiler makes it glitch out

dense owl
dense owl
lyric flint
#

Successfully sensed can be false when, for example, something leaves sight range, I believe.

hearty niche
hearty niche
terse panther
shell sable
snow fiber
#

This is written in Blueprint then?

gilded tree
gilded tree
#

Oh okay. I heard it was best usecase here earlier to call an event from the task to the actor, as the task would be the director, and the actor the executive

terse panther
gilded tree
#

I’ll definitely give it a try 👍 I’m in need to replicate this, but since AI is server-client anyway it should be fine right

terse panther
gilded tree
#

Hehe ☺️ I’ll check it out though, thanks for the pointer!

dawn schooner
#

I'm trying to create a C++ StateTree task (child of FStateTreeTaskBase) but I'm getting the error:

  StateTreeTaskBase.h(86): [C4430] missing type specifier - int assumed. Note: C++ does not support default-int

I've made sure I'm including the right header and added the StateTreeModule and GameplayStateTreeModule into my plugin's Build.cs.

dawn schooner
#

It would seem as if it's an actual engine error, because the error points at a engine file, and if I comment it out in the header, my code compiles and builds fine

#

odd

still crypt
#

Does anyone know if there is a BeginPlay alternative for ai controllers? Or alternatively where is the right place to bind delegates to respond to AI perception events?

harsh storm
#

BeginPlay

still crypt
#

But AAIController doesn't have a begin play override?

dawn schooner
#

all actors should have one afaik

still crypt
#

According to the docs it does not, and though I can still add it in code just fine it doesn't appear to be called

harsh storm
#

If you think it doesn't, you need to take screenshots and show what you're looking at because it would have to be a forked version of Unreal with BeginPlay removed from Actors entirely.

dawn schooner
#

C++ classes can override grandchildren methods right?

harsh storm
#

I don't understand the question

#

Parent childs can't override child methods, because parents don't know children exist

dawn schooner
#

Yeah I formulated quite inconrrectly

#

I mean

harsh storm
#

Grandchildren can override grandparent methods because they're just virtual anyway

dawn schooner
#

so any actor can override BeginPlay

harsh storm
#

Yes

#

Every inherited child gets all methods of the parent class and then that parent class and then that parent class, so on and so forth. (as long as they're not private)

dawn schooner
#

thanks for the clarification

dawn schooner
#

BTW about my issue above - it was probably an engine issue, upgrading to 5.1.1 solved it.
#gameplay-ai message

lunar grove
#

Hello, I have some problems with how to structure my AI.

By reading some articles I understood that in theory all AI process should be split up in three areas: compution, database and execution. However, when in comes to practice, I have some question. For instance, let's say that my AI has two main behaviors - combat and idle, and each of the behavior should have its max movement speed. How and when should I switch between the two? I have some missunderstanding on how to correctly structure the first area.

still crypt
dense owl
lunar grove
dense owl
lunar grove
#

So I would need to exactly know the state I'm in from, let's say, a player controller? It's the one controlling the BT

dense owl
#

Not necessarily

#

If you have 2 separate tasks, you just set the variable as needed each time one of those tasks starts

lunar grove
#

Wouldn't this intrude the execution with the logic?

harsh storm
#

Don't be too scholarly with your approach. Do what works.

#

Unless, of course, your goal is to be scholarly

lunar grove
#

There are many things where you can do whatever works, but then have technical debt which won't allow you to improve whatever you've developed so far

harsh storm
#

You're gettin' technical debt no matter what.

#

And who said to separate these things are "good practice"?

#

How do you know it is?

#

Because some articles made the claim?

#

Everything has context.

#

If you're building some super large game as a service, it matters more

#

If you're doing your standard indie game - it doesn't.

dense owl
#

IMHO, you can always replace the duct tape and rubber bands later, if you find a better solution

#

But depends on your circumstances, like Duroxx said

lunar grove
#

The worse the practice, the more debt you get, that's what I wanted to say

I'm basically trying to learn how I can make these things in a way that would work good enough, rather than just work

#

So my final goal is to understand how to make good, rather than just make

dense owl
#

A noble goal indeed. Sry, idk what is the right way to do it. That’s just how I would approach it with my limited knowledge

harsh storm
#

The "right" way is the way that ships the product with the constraints of the project.

Sure, having a BTTask that just alters the speed isn't the "right" way - but it works for this project. Game code is typically really awful. Specifically because it's often just throwaway code.

Structuring your AI doesn't fit into some neat box "computation, database, and execution". It fits into w/e box your game requires.

#

In this case, a BTTask could fit the computation and execution roles

#

Does that mean it is bad? No

#

Task could compute the total damage to do for example (not how I'd do it, but just roll with it), as well as actually execute the animation to do the attack

#

Database would be in the blackboard, the data asset, the actor, or the data table

#

Good structure is created by the confines of your given project.

#

I'm sure someone like Zoomba or Luthage can come in and give a more scholarly answer though.

uneven cloud
uneven cloud
uneven cloud
# lunar grove What's a better solution?

It entirely depends on the size and complexity of your game. And what you are trying to do. There is no "perfect solution" as everything has pros and cons. I typically prefer a data driven gameplay approach, but that doesn't work for every game.

lunar grove
uneven cloud
dense owl
#

Nice.

uneven cloud
# lunar grove Can you make an example of a data driven gameplay approach for an AI?

The entire point is that these approaches aren't hard rules to apply to everything, but where they make sense. If you have 5 different AI then you won't see a lot of benefit to data driven gameplay. But if you are making a live service game that can have hundreds of different AI, it will make it a lot easier to ship.

The goal is to actually ship the game. Getting bogged down in the "perfect solution" doesn't get you any closer to that goal.

lunar grove
#

All right, thanks 😄

harsh storm
#

@uneven cloud I do have a question that perhaps you could clarify; why would you use a service for that operation? I was under the impression that services should be used for tick like stuff that isn't necessarily good for tasks.

uneven cloud
harsh storm
#

Fair

uneven cloud
harsh storm
#

I just always think of them as doing some background thing but with tick 😅

delicate brook
#

hi

#

anyone faced a problem with the spawning ai not moving?

#

i checked the "placed in world or spawned"

#

he has a nav mesh invoker

#

idk what else to do and im stuck

dense owl
#

Move it somewhere else, see if it’s a collision issue

#

Or a mesh issue

delicate brook
#

yeah idk whats going on but if i move my target point he might spawn and might not

#

its weird

hearty niche
uneven cloud
hearty niche
#

That is the sad part. The wp implementation is not production ready

hearty niche
uneven cloud
celest python
#

You might find trying to solve more underlying problems more interesting that solving specific cases like you mentioned at first

#

There is already a controversy about UE's implementations which will confuse you along the way if you dive into community more, some hate it while some able to make sense at least to some extent

#

But yeah generally thinking about data first is always the best approach no matter what but the way UE expose data to AI is kinda making you brainstorm with "just do it the working way" when you're shipping games

gilded tree
#

Is it possible to call this Task function from within a blueprint actor? I.e when a montage is completed, I wanna do this. As replicating a montage through a BT Task seems to not work

dense owl
#

Finish execute does not call a task, it just marks it as successful or not, if that’s what you were asking

#

Nor should you try to use it outside of a BTT

uneven cloud
dense owl
#

I have a BTT that sends an interface message to trigger an event. The latter contains an AIMoveTo node halfway through the code. Problem is, that's not where that event is meant to end, but it looks like the OnSuccess output of the AIMoveTo is signaling the BTT that it's ok to move on to the next node, which finishes the execution:

#

not sure how to get around this, any insight would be appreciated 🙂

uneven cloud
dense owl
#

yeah, I had a feeling it might be because it tries to do it in one tick

#

thx, I'll try that

lunar grove