#gameplay-ai

1 messages · Page 32 of 1

celest python
#

you dont because its an antipattern

#

you use state machine for those

vernal vector
#

sooo do i stop using the BT and program my own in the enemy blueprint?

celest python
#

you didnt share much context so i dont know

#

prefered way is designing your BT properly and manage the control flow with BBs and decorators

uneven cloud
#

Use the visual logger to debug. Also check your NPCs collision settings. Sounds like they have something blocking visibility that is larger than the mesh.

celest python
#

but if you need to jump from random node to an another, BTs are the wrong tool for you

vernal vector
#

basically, i got an enemy that patrols around.
when it sees you, it looks at the last known location for 3 seconds. after that, if it doesnt find you, it patrols again.
if it looks at you for 3 seconds and it spots you, it will run after you.

foggy moth
rancid wing
#

anyone?

foggy moth
#

can you debug to see if its activated?

rancid wing
#

oh wait mb I already got this fixed last night lol

foggy moth
#

but you just asked abotu it....

#

10m ago

rancid wing
#

I know Ive been having a hell of a day lol, sorry for the trouble man

foggy moth
#

there were no troubles - just long pauses between communications 😛

rancid wing
#

Yeah I apologize

dense owl
foggy moth
rancid wing
#

how do you set the location of the enemy within the behavior tree tasks?

#

I just want the enemy to dodge incoming projectiles

dense owl
rancid wing
#

What I tried to do was set value as vector then set location in another task

#

Didn’t work though

#

I’ll have to debug when I get home

foggy moth
# rancid wing What I tried to do was set value as vector then set location in another task

you realize tha tsetting the location will warp the actor to wherever you're setting the location instantly right? I'm not trying to tell you how to program your game ... maybe this IS what you're looking for....

But If this were my project and i "wanted to dodge incoming projectiles" ... I would:

1: Detect incoming projectile coming my way
2: GetAIControlledPawn()->AddImpulse(FVector) in the direction left/right (random??) that you want to dodge. Maybe even wait till projectile has moved past or landed wherever it is destined ... whatever your logic is - until it moves back into harms way (if appplicable)

foggy moth
#

I"m trying to debug why my player pawn is only AIPerceived from the initial spawned enemy out of a spawner class i made...

Tracking this down i found that UAIPerceptionComponent::ProcessStimuli() this->Owner is always AIController_C0... and the pawn is always the same... but i'll have N# of pawns spawned every few seconds - I was expecting different controllers/PerceptionComponents showing here....

Is this a singleton? I would hope not - am I up against a ghost/problem with PIE play testing?

ROOT PROBLEM: AI Perception of my player is only perceived from the first spawned enemy.. any successive spawns the player does not show up in the list of UpdatedActors:

vernal vector
#

whats a good way to move enemy to player?
service that updates a BB location variable on a MoveTo task
or
task with a Move To node in the blueprint

foggy moth
# vernal vector whats a good way to move enemy to player? service that updates a BB location var...

In this Unreal Engine Tutorial I show how to add an enemy with an AI Controller that follows the player.

It is a very simple AI but I introduce some basic AI components: The Blackboard, a Behavior Tree and the AI Controller blueprint.

See my social profiles here
G+: https://plus.google.com/+JayAnAm
Twitter: https://twitter.com/jayanamgames
Fac...

▶ Play video
uneven cloud
foggy moth
uneven cloud
viral parrot
#

Hi everyone. Looking for some assistance. I want to create 2 different types of units, one which can go up steep ramps, the other can only go up small angles. I want the NavMesh to respect these two different types of units, so that the unit who can't go up steep ramps doesn't consider paths that go up said ramps. Is there a way to do this without creating two different NavMeshes?

foggy moth
foggy moth
uneven cloud
uneven cloud
viral parrot
#

Yeah, the CharacterMovementComponent just doesn't allow them to get there. It doesn't affect the NavMesh data. So am I am guessing I would have to touch the engine code in order to accomplish this without creating two different NavMesh's?

uneven cloud
uneven cloud
foggy moth
#

the problem I have is that all of this code is native UE Source - i have no overrides....

#

so the PawnPerception actors - i cant wrap with VisualLogger (not without al engthy build of engine that i dont really feel like doing in a shotgun attempt at what may result in nothing :/ )

uneven cloud
#

You do know you can edit engine files, right?

foggy moth
#

i wanted cake & eating it too :p

viral parrot
uneven cloud
#

What do you mean wrap with visual logger? You just add log statements

foggy moth
#

sure i'll try the log statements

#

in this reading - it wrapped entire functions with a VisualLogger macro

uneven cloud
#

No idea what you think you are reading. It's just a log macro that is for the visual logger. UE_VISLOG

uneven cloud
foggy moth
#

this is ActorSnapshotting - (this was towards @uneven cloud )

#

@viral parrot i'm only attempting to help on a subject that i dont really know much about - but i did find this in ProjectSettings:

#

aside from that i'll stop giving you incorrect informaiton.

uneven cloud
viral parrot
uneven cloud
#

The entire point of the visual logger is that it's a timeline debugger that is separated out by categories and actors.

#

Multiple nav meshes isn't really that expensive. I've shipped multiple games with 3 (indie, AA and AAA).

viral parrot
uncut slate
#

i was using them to keep my enemys in a certain bounds of area they can patrol

uneven cloud
uncut slate
#

is there a better way to keep an ai enemy in a spot for roaming ?

#

one single bounds volume ? or it's np to have many ?

foggy moth
vestal gale
#

I'm a little confused about the layout of the smart object components, there's a good few there but I'm kinda confused as to where to put what logic for basic AI tasks.

#

Theres:
The actual smart object component tied to the actor
Smart Object Definition
GameplayBehaviourConfig
GamePlayBehaviour objects

Could someone explain the flow of these components? I've read the documentation, but it's pretty unclear as to why all the components are needed, and what kind of setup you would need for say, lining up a character with an object and playing an interaction animation

uneven cloud
# vestal gale I'm a little confused about the layout of the smart object components, there's a...

There's only one component.
Smart object component registers the actor as a smart object.

Smart object definition is a data asset that defines the smart object. It has slots (locations the object can be interacted with) and defines the behavior.

Gameplay behavior classes are the implementation of the behavior that happens when a smart object is used.

Gameplay behavior config is the data that is used for the gameplay behavior.

vestal gale
# uneven cloud There's only one component. Smart object component registers the actor as a sm...

Thanks for the explanation.

So, in the example of getting an NPC to sit down at a location I would trigger that on the Gameplay behaviour I would trigger that on the Gameplay behaviour and pass data about the location and animation through the config right?
The issue I'm facing is that I can't seem to find a way to set the config variables on the definition asset through the smart object actor...

uneven cloud
uneven cloud
vestal gale
vestal gale
uneven cloud
vestal gale
#

I figured I would have an instance editable variable of skeletal mesh on the config and I would be able to set it on the actor, but as you said I can't seem to do that

uneven cloud
#

No you can't do that. If you look at section 2 - Create the AI Gameplay Behavior again, it will show you how to set up the config, how to get the config in your gameplay behavior and that you are sent the smart object when it's used.

vestal gale
drifting hollow
#

I'm having trouble trying to get my AI character to move towards the player charcater.

#

Fixed it

vestal gale
uneven cloud
vestal gale
# uneven cloud You set the data on the definition.

Yep, that all makes sense.

Here's the setup I have now:

2 general questions:

  1. There don't seem to be any settings for working with lining up animations to objects, is this something taht should just be done on a different actor and the values copy pasted onto the definition?

  2. As you can see here, I'm getting warnings for attempting to line up a skeletal mesh to a location value from the data asset, what is the correct way to fire off this functionality? Should I just be calling an event on the character itself instead of handling it in the gameplay behaviour?

uneven cloud
# vestal gale Yep, that all makes sense. Here's the setup I have now: 2 general questions: ...
  1. I don't believe there is a way to get the slot offset in BP, unfortunately. I recommend instead of setting a vector, which will never work, to use an offset from the smart object actor.

  2. Your 2nd image is unreadable, so I can't fully read the error. However it looks like you are trying to manually move the character's mesh component, which you should never do. Just move actor to location.

vestal gale
# uneven cloud 1. I don't believe there is a way to get the slot offset in BP, unfortunately. ...
  1. Ok, will get a little more tricky when it comes to multiple slots, but I guess I'll work that out.

  2. Error basically says it's unsafe to call move component to from a gameplay behaviour BP. This logic is called after the character moves to the object, the logic is there to line up the mesh in order for the animation to be facing the location correctly. I've seen tutorials use this method plenty of times (theres steps I haven't added yet like disabling collision), but how would you recomend I do it? Simply moving to the location isn't enough as the orientation is often off

uneven cloud
vestal gale
#
  1. How so? Adjusting the rotation data seems to be purely a visual thing for design, but yes the location offset is good.

  2. Cheers, will go with that method 👍

lyric flint
#

Hi! I’m trying to get my first job in the industry and want to make a playable demo to show off my skills. Does anyone have ideas for unique AI mechanics that would stand out in a portfolio?

celest python
# lyric flint Hi! I’m trying to get my first job in the industry and want to make a playable d...

Design is up to you but

  • Show off you know the difference between a SM and BT
  • Use EQS
  • If possible utilize C++ BTTask with memory structs
  • Systemic AIs lets you be more creative and easier to impress people if you can get it done
  • Implement your own utility system on top of the BTs execution flow
  • Make AIs remember/forget things with a timespan

and specifically ask Luthage about other ideas when she is around because she's the most experienced when it comes to industry

#

also a placebo hack is commenting your work with like "this implementation is inspired from this gdc/book/talk/website" gives the impression of you're able to research things on your own and I saw benefits of this trickery during my interviews 😄

#

Optionally also get used to interoping your AI with GAS

lyric flint
celest python
#

Its related with the overall desing of the AI and/or the game you're developing the AI for

#

Authored AI: More like CoD AIs, what AIs are going to do pre-defined and scripted

#

Systemic AI: Hitman like AIs, everything is like a simulation and behaviors are abstracted away

lyric flint
#

Ahh alright, that sounds really interesting, I’ll have to look into it

celest python
#

Some games also combine this and do some creative stuff like Uncharted

lyric flint
#

Thanks again 🙂

celest python
#

np, dont forget to check pinned messages for more cool things like this

#

and GDC talks

rancid wing
rancid wing
#

or well, is this A correct way?

rancid wing
rancid wing
foggy moth
rancid wing
#

It didn’t have the blueprint

foggy moth
#

you have BTTask/service you can do ... and any of them can have actor pointers in them?

rancid wing
#

Hmm I’ll give that a try in the morning then, thanks!

rich veldt
#

Hi. Does anyone know why calling a RunEQSQuery node and binding to OnQueryFinished can take 10+ seconds to dispatch/finish the EQS? The EQS is only a SimpleGrid, 2000 radius and 250 density. Using an EQS Testing Pawn in the area I'm trying this in gets me maybe 15 items total, as the navmesh is skinny.

#

Could low framerate drastically increase the time it takes for an EQS query to finish?

#

It seems to be variable. Sometimes 3 or 4 seconds sometimes much longer. I call it in a loop, after it finishes and the results are parsed I call it again 3 seconds later.

stiff gale
#

Anybody knows how to use AnimationSharing for aggressive AI?

still crypt
vestal gale
#

Anyone else had troubles with smart object related crashing issues when you end playing? :/

Very simple setup, literally 2 characters walking to a smart object on a map (driven by a BT, pretty much identical to the UE quickstart guide setup), works fine when I run, but when I end the engine crashes with this message:

Assertion failed: OwnerController->GetPawn() [File:D:\build\++UE5\Sync\Engine\Plugins\Runtime\GameplayBehaviorSmartObjects\Source\GameplayBehaviorSmartObjectsModule\Private\AI\AITask_UseGameplayBehaviorSmartObject.cpp] [Line: 271]

ocean wren
# lyric flint Hi! I’m trying to get my first job in the industry and want to make a playable d...

Personally, I'd look at demonstrating a bunch of logic approaches (state machines, behaviour trees and Utility systems are a good start). I'd also look at demonstrating animation integration, so maybe something like having a battle between two sides with cover taking. A lot of employers ask for things like pathfinding which is pretty silly, but you could do worse than implementing some crowd agents to demo that. Also maybe things like doors/ladders/elevators etc. They'll likely want to see lot level skills, so stuff you've made yourself in C++ and then stuff that integrates with Unreal Engine. I'd probably want to show of writing AI toolsets too, so look at maybe extending an editor somehow (enabling states in the behaviour tree editor springs to mind of the type of thing). Ambient AI stuff like having citizens in a street using smart objects might be a good demo too. That said, a lot of this depends on the studio and the products they work on, so maybe figure out where you want to work and build the demo's to suit?

#

Other than that.. how about some multi-agent coordination? Or some more advanced navigation stuff, like having a system that allows flight through tight spaces. Or just some actual gameplay demos that don't suck and have an AI feel (if you're going for more gameplay AI rather than tech)

#

Might even be better to just make an AI centric indie game and show that 🙂

lyric flint
real dock
#

I'd like to take this time to personally thank whatever badass wrote FAISystem::CheckIsTargetInSightCone and blessed us with this amazing comment:

lyric flint
#

I'm trying to come up with a decent way for enemies who are in combat to notify other nearby enemies to also join into combat. I have two initial thoughts, but any perspective would be much appreciated:

  1. When an AI enters combat, use Report Noise Event and tag it such that when other perception components hear a noise event they check the tag. If it's equal to Combat, they then also enter combat and report a noise themselves. (I'd also likely do a pathfinding check to see if the two AI are close enough for the noise to be successful. If there is a room between them, the noise perception would be discarded.)
  2. Have a BP_AIGroup where each AI registers itself with the group. This blueprint runs on tick or on callbacks and, if any of its members enter combat, the rest of them do as well. (This feels slightly less realistic because it doesn't take distance into account.)

Any thoughts?

rancid wing
round knot
uneven cloud
# lyric flint Hi! I’m trying to get my first job in the industry and want to make a playable d...
  1. Look at job descriptions in your area and write down the skills needed. Gain those skills.

  2. Make tech demos in C++ if you are looking for a programmer job. Lots of people say to make solo games, this is a complete waste of your time. If you are unsure about what to make, find interesting talks from the GDC AI Summit and recreate what the talk was about. Use programmer art or free assets. We don't care what it looks like.

  3. Do game jams. Being able to work in a cross discipline team is a skill you need to have. We will ask you questions about working on teams, so prepare your answers. Things like conflict resolution and pushing back on design are key topics.

  4. Network. Go to local events. Form relationships with different people. Most jobs in the games industry are from your network. My current job wasn't even posted before I was hired, which is incredibly common.

  5. Apply everywhere. Apply to gameplay programmer jobs as well as AI specific roles. Apply to smaller studios, which have less competition than the big ones.

lyric flint
uneven cloud
uneven cloud
lyric flint
#

I see, that’s very different from what my teachers taught me. I really appreciate it!

uneven cloud
celest python
#

We get hundreds of applicants for roles
really?

#

like 100s for AI programming role or in general?

uneven cloud
celest python
#

wow, interesting

uneven cloud
#

Senior is a lot different. We've had a role open for months. Most of what we get is junior applicants. But I have 2 juniors right now, so I can't mentor another.

celest python
#

I assume senior in AI role is also very comprehensive

#

its also less attractive than other roles i guess, or at least less popular

#

so no wonder its been open for months 😄

uneven cloud
#

I think it's harder to get the experience. Not a lot of people hire junior AI engineers. People usually start as gameplay. They either get experience by picking up AI tasks or find someone to let them move over.

The 1 senior I have now has never done AI before. So I'm mentoring 3 people, which is a lot.

#

I started out in UI, because I have a background in art. My 2nd job was gameplay, but I was able to do a lot of AI work, because I had done a lot of AI things on the side. Which allowed me to specialize as an AI engineer for my 3rd job.

celest python
#

I started out of curiosity without any prior experience/role, then got hired in a local studio to assist existing experienced programmers. They werent able to do AI because of the workload so I wanted to take some initiative to learn, ended up reinventing some things in the engine like perception and EQS but that gave me some confidence. Later on I continued with the motivation of getting hired as AI programmer until I really got bored of trying to workaround things because AIModule makes everything very difficult. These days I feel like I'm decaying even further from anything related with AIModule especially after I worked with Kythera for a month

uneven cloud
#

I was a bit of the opposite in that during job 2, I had a month of downtime as they were trying to get funding for a game. So I documented all of the AI systems in UE. So once I started using them professionally, I fully understood them. I also worked with a bunch of people with a decade of UE experience, so I learned how not to fight the engine.

rancid wing
uneven cloud
rancid wing
#

I see

#

Sounds like you out in some good work!

#

Is there also a c++ version of ai tools in unreal?

foggy moth
lyric flint
obsidian igloo
#

when using character movment the character will sometimes jitter left and right when taking a corner or moving diagonally, is there a way to fix this?

#

I do have smooth rotation of the character, but it still jitters pretty hard sometimes

ivory rune
ocean wren
# lyric flint I'm trying to come up with a decent way for enemies who are in combat to notify ...

In my own implementation, I used a message bus to notify my team/squad of events.. the squad controller used the info for target selection (don't all fire on the same enemy when multiples are visible) FMessageEndPoint is the place to look. I really enjoyed using it. So having an actor that coordinates response for the group makes a lot of sense. Mine had timeouts and the like too, so best to add yourself some debug visualizers

dry thicket
#

Sorry for duplication, I asked my question likely in wrong place first time. Just noticed the AI chat here now.

I have highly modular vehicle and each component of this vehicle could be as target for AI. I'd like to use AIPerception to detect those targets by AI but the issue is the sight can only detect actors (not components). I plan to replace some of my static mesh components to separate actors but I am afraid about performance, since components are lighter than actors.

I don't want excessive calculations since I need to check each static mesh component on visibility (whether it is blocked or not) and distance by custom functions although Sight has already done it if they could be actors. And it uses time-slicing under the hood not to take all CPU time. I will not have so much vehicles. The more interest for me is those components. Does it make sense to replace those "target components" to actors? And what about performance in this case?

ocean wren
#

That would depend, do you want to see all of the component parts (i.e. if any of them are visible) or do you want to just randomly know if any part is visible to mark the whole thing visible?

#

I wrote my own sense using the AISight as a template and did some stuff with that for things like checking individual bones on a skeletal mesh

#

My use case was just "is some part of this guy visible", for which you could just subclass the function that picks the point to do the sight trace too

#

But then I went overboard and had stuff like concealment volumes (bushes etc)

#

Have a look for the sight target interface I think its called? GetSightTarget or something similar.. its been a while 🙂

dry thicket
#

All those components are individual separate parts of the big vehicle. If only one is clear by visibility (AI can hit it) and others are blocked by some other collision it means that only one par is visible by AI and could be hit

ocean wren
#

Its a function you can implement that chooses where to look on the actor.. you could just tell it to look at each component in turn

#

Its basically what I did for my bones

#

I just had a "percentage of bones seen" value, because I wanted to alert a suspicious agent if it saw a foot poking out from a bush

dry thicket
#

Just had a quick look into IAISightTargetInterface. It has a method CanBeSeenFrom. But not sure if it could help me. It just perfectly works if I needed to detect what points and how much AI sees. It would work like in your case if I needed custom interpretation what is seen and what is not. But still GetCurrentlyPerceivedActors or event will return me a central actor (vehicle). In my case I look for a way to operate over targets in more simple way having an access to all targets "from the box". For example, calling GetCurrentlyPerceivedActors, giving to AI targets to attack

ocean wren
#

Well, you can just take the returned actor and get all of its components, the point is that you can implement CanBeSeenFrom and do the tests for each component there

rich veldt
#

hah...ok...

#

it was an EQS with no tests on it

#

i added an arbitrary/useless test (distance, prefer lesser or filter only, from 0 to the simplegrid's radius size param) and it works fine

#

this is...normal behavior? we aren't allowed to just generate a SimpleGrid or something and return the items as an array without waiting 10 seconds?

lunar grove
#

Hello, is it possible to use AI senses with player controller? I need to check whether player sees AI characters of a certain type, so that they do something, and I thought that applying their senses against them is a way of doing that

lilac sun
#

Anybody have any good recommendations for learning systemic AI or utility AI?

dry thicket
lunar grove
# dry thicket I am doing the same thing right now. And I've got this working. My player can de...

I saw that AIPerceptionComponent.cpp 191 is saying

// Whilst it should be possible with some code changes, to make perception components work when being added to other AActors than AIControllers, it's not something Epic support.
UE_CVLOG_UELOG(!AIOwner && Owner->GetWorld() && (Owner->GetWorld()->WorldType != EWorldType::Editor), Owner, LogAIPerception, Warning, TEXT("%s: Perception Component is being registered with %s, they are designed to work with AAIControllers!"), ANSI_TO_TCHAR(__FUNCTION__), *Owner->GetName());

Did you encounter any problems though? From the comment it seems that something should break

dry thicket
#

I can confirm that I added my custom AIPeception component to my PlayerController. It is just a component that I inherit from UAIPerceptionComponent to make it Blueprintable to extend it in Blueprint. You can't create a blueprint from AIPerceptionComponent directly. Then I Implemented IGenericTeamAgentInterface to get Detection By Affiliation working and print the result that comes from OnTargetPerceptionUpdated and it prints me a correct enemy pawn. At this step I have no issues but maybe they will be later.

#

I need the same methods of target detection. Since my pawns can play from player commands and be as AI as well, this is a reason why I want to get it working with a player. When player plays, a pawn still has to detect available targets as AI

lunar grove
#

That's weird, I've tried to do something similar, but it didn't work to me. I'm not sure what direction the vision cone is looking at though since I can't use perceptions debug thingy 😦

dry thicket
glossy basin
#

Hi! Quick question about the AI Sight Sense. How could I change the height of the AI? For what I understand, the AI does a linetrace from the location of the AI to the location of the Target, but I would want to use a custom height, like the eye height of my AI.

People in UE forums tell me that I have to make targets inherit from the IAISightTargetInterface and override the CanBeSeenFrom function, but I'm not 100% sure of it

dry thicket
#

for example:
void YourCharacter::GetActorEyesViewPoint(FVector& Location, FRotator& Rotation) const
{
Location = GetMesh()->GetSocketLocation("eyes");
Rotation = GetMesh()->GetSocketRotation("eyes");
}

glossy basin
#

or the targets of my AI?

lone stump
#

your AI character

dry thicket
glossy basin
#

Thank you so much!

dusty quest
#

Hello everyone. Is there a node similar to "GetRandomReachablePointInRadius" , but gets all the points in the radius rathern than just the one.

dry thicket
dusty quest
glossy basin
# dry thicket yeap. I have been doing that a long ago. But as I remember this is a way how I r...

It worked perfectly! Thanks. My only problem is that, for example, even if the enemy head is above a wall, and the player's head is above the same wall, the enemy should be able to detect it, which is currently not happening

In this case, should I make targets inherit from the IAISightTargetInterface and override the CanBeSeenFrom function? or it would be better to create my own AISight sense and override the function that generates the linetrace

sudden citrus
#

How do people generally solve spawn animations? Especially if the NPC is supposed to crawl from under the ground. We're spawning the actual actor in the intended position and animating the mesh from underneath. Tried a Gameplay Ability, but that made it pop from t-pose into the starting underground position, so now just doing it in the anim BP, but I feel we missed a trick. Spawning underground and animating up with root motion doesn't feel right, I want the capsule in its intended position

sudden citrus
dusty quest
sudden citrus
#

You want two million points?

dusty quest
#

I dont necessarily want that but I want to be able to get points in a radius and manually filter then out accordingly. Which I guess running the EQS could do for me

sudden citrus
#

Or all points an X distance apart?

dusty quest
#

X distance apart

sudden citrus
#

well here we go

#

"all points" isn't a mathematically sensible concept

#

if you're imagining a grid, the navmesh won't tell you that

#

so yeah if you try a simple EQS query which generates a grid and casts them to the navmesh, that will work perfectly for you 🙂

dusty quest
#

That makes sense. I didnt think of it giving me points that were 0.001 away.

sudden citrus
#

"get random reachable point in radius" doesn't get all points and pick a random one, it generates a random point and checks if it's reachable, or starts from the origin and nav walks in a random direction

dry thicket
dry thicket
misty gale
#

At that point you probably wanna evaluate them or smth? If so the eqs can be your friend

uneven cloud
glossy basin
twin marsh
#

Hot damn, turns out using a much smaller RVO radius was all that was needed to eliminate most of the "body blocking" on the nav agents. 🥳

oblique basin
halcyon dagger
#

Is it correct to run behaviour tree on event "On Possess" or it is more correct to run on "Begin Play"?

oblique basin
#

On possess makes most sense as you're guaranteed to have access to your pawn

drifting hollow
#

I've created a behaviour tree where the enemy will roam around an area and if it sees the player character, it will begin to chase the player and shoot. Once the player character leaves the area, the enemy seems to just stop. I would like the enemy to roam around the area again. How do I do that?

#

In other words, is it possible to go back to "Look Around"?

dense owl
#

Then on the new right branch (is not set behaviour) you can do a random wander behaviour, where it gets random locations and moves from point to point. You can watch the 3rd pinned link video to see how they do that

uncut slate
#

if player is not set it should roam

#

so maybe when you leave the area try to reset that, it's probably stuck on hasseenplayer, i would log that value see if it changes when your trying to change it

uncut slate
#

i used the ai controller to set player, and the aiperception to turn it off/on

#

not sure about the correct way or not, but this seems to work well so far

#

instead of a canseeplayer boolean, i just set the player object / set it to nothing

snow swift
#

Hello everyone ! I need some help with receiving Yaw input from ai controller. How to get rotation only in one axis ? So I need them just look left or right

rancid wing
#

whats a good alternative to a timeline inside a bttask?

#

Im trying to set velocity on timeline update

#

this but in bttask

quick current
#

Hello! Quick question about AI Stimuli Source C++. How do I change the height of the Stimuli Source so the AI can see the character in a custom height, whereas by default, it tries to see the center of the Capsule Component. I need this because if my AI is half hidden behind a cover, it's will not be detected. The start of the trace is correct, it traces from the eye of the AI (as I wanted) to the center of the seen capsule which is wrong.

I have tried to override the GetActorEyesViewPoint function in my Character, but it doesn't work. Should I dig the Perception System code or there is a simple way to do this? In the picture, the left Ai can see the other, but the right can't.

uneven cloud
rancid wing
#

So when I put a rotate to player task the ais rotation is off by 90 degrees, any advice?

uncut slate
#

rotate to face bb entry

rancid wing
fathom dome
#

If I wanted some mass ai what are some of the cheapest forms?

oblique basin
oblique basin
rancid wing
#

I really gotta work on using debugging for blueprints lol

haughty coral
#

I think I don't understand this EQS behavior. If I configure distance test to Filter Only (no scoring), give it some max, then queries set as All Matching / Single Random Item from Best work a expected (on the right) but queries configured as Single Best Item seem to give just wrong result (left). There is no difference between these two, same query and setup, the only difference is Querying Mode.

haughty coral
#

anyway, for now I will use workaround Filter & Score with Score Factor 0, works as expected

#

unclear if it is just debug rendering issue or query issue

dry thicket
quick current
timber stag
#

Hey guys, I need some pointers on how to create in-fighting (where enemies fight each other). I already have aggression values and some attack animations set up but they only attack the player for now. I cannot seem to figure out how to do this for AI vs AI and there's literally no resources online.

Thanks in advance!

uneven cloud
dense owl
ashen jay
#

im trying to make a tower defence game and ive come across an issue where i cant seem to get the ai to move around the world, i have an ai controller and a nav mesh, the AI bp doesnt seem to be firing on event begin play even though i have the parent and child actor connected

#

the child actor spawns in the world playing a walking animation but doesnt move off the spot it spawns on

dense owl
ashen jay
#

its not working on the parent

dense owl
#

you're saying it's not firing, but in the other channel I thought you said the move is failing

ashen jay
#

in the level bp im getting the child AI to spawn off points around the world and when they spawn they just walk on the spot

#

so this is failing

dense owl
#

for one you should prly not do things in the level bp, but we'll focus on the AI part for now

#

"not firing" != failing

ashen jay
#

ye ok

dense owl
#

if your moveTo is failing, first thing to check would be your navmesh is showing ok, then give it a different destination and see if it works.

ashen jay
#

this is my level bp

dense owl
#

you'll likely need to use the Tools-> Debug-> Visual Logger, but for starters, I'd try playing with the destination coordinates, see if your goal location is bad

ashen jay
#

ok

#

omfg ive spent 6 hours trying to fix this and it was just th z value omg i had it set to 0 and it needed to be set to -4000 bruh

#

im so pissed

#

so much time waisted

dense owl
#

aye, lots of problems will have simple answers like that 🙂

ashen jay
#

thanks though

#

very much appreciated

timber stag
dense owl
timber stag
#

yeah ofc those too

#

that's how my animals detect each other and their food

timber stag
dense owl
#

ok, so which part doesn't work then? just them attacking each other?

timber stag
#

I've set it up in a way that only certain prey can be attacked by predators

#

they "hunt" for them

#

it's an OHK for now

timber stag
#

they seem to just stand next to (or inside) each other

dense owl
#

so they do the hunt part fine, just don't actually attack when they get there?

timber stag
#

(collisions are funky because I am using the character class)

#

I have a lion and a crocodile, both of them hunt deer and zebras

#

but they don't interact with each other

#

the same thing with hippos, they are apparently the most aggressive animals on the planet but they only attack the player in my project

dense owl
#

did you make this interaction code yourself or is it some plugin?

timber stag
#

this is the whole list of interactions but very little of it is functional

dense owl
#

ok, so predators attack prey but they don't attack each other?

timber stag
#

yes

dense owl
#

k, well we'd need to look at that code

timber stag
#

I'm doing some refactoring with herbivore food rn, after that is done, I'll need to make it so they compete with each other as well

timber stag
timber stag
#

hold on I mis-configured a few things

#

alright, looks like I have some other stuff to deal with for now

#

I'll come back here later

#

thanks for your help man

dense owl
#

Hehe np

haughty coral
vestal gale
#

Getting super inconsistent results when setting up an eqs query to find a valid location for a ranged attack.

Basic system is: generate a wide grid around the player, trace to the midsection of the player from each point and filter out any thing that hits something on the way (the player is set to ignore the trace, everything else blocks), then score for the closest item.

Everything looks fine in the testing pawn, but when running it live the points all seem to register as valid, none are being filtered by the trace!

Can't seem to work out why it's going wrong, any help would be great 😃

#

Everything looks correct on the test pawn

lunar grove
terse panther
#

Hey is there a way to feed custom path points to MoveTo function so that it won't do path finding ?
i tried back tract the moveto function to look for a way to do this and found this function "FORCEINLINE FPathFindingResult FindPath(const FNavAgentProperties& AgentProperties, const FPathFindingQuery& Query) const" but can't backtract this function any further.

hallow compass
#

Hello
Is there a way to control how "AIs" BTs are loaded in game ?

For e.g: I don't want my wandering AI to wander when the player is out of side (for performance)

wary ivy
#

lots of different ways

uneven cloud
still crypt
#

Anyone know of a performant means of checking if the AI is on a nav-mesh? Is a nav mesh trace suitable?

hallow compass
uneven cloud
uneven cloud
hallow compass
#

i sadly dont use c++

#

well ty anyways, i'll try finding what i want

timber stag
dense owl
#

I think you’d be better off to stick that bool in a bb key and check it using a decorator, so if it fails you can abort up

uncut slate
worn widget
#

should tell you what conditions are failing

fathom dome
#

So when I use normal navmesh it takes ages to create the navmesh for even a small testing area i'm using.

#

I also tried to do navmesh invokers

#

but that was worse and droped my fps in game to the 10s from a smooth 120

#

It seems like this stuff just works out of the box in the tutorials I see with them using it in much larger settings

#

is there something I could be missing?

#

I'm struggling to find answers online

dry thicket
#

Hi, does it make sense to write my own AIPerception system? I got modular vehicles which consist of multiple components. And those components are going to be as potential targets. Most of the time I will query those components not actors. Since AIPerception works with actors it arises a question about writing my own optimized perception system. Does it make sense? Maybe reconfigure vehicles and replace components by actors? I've got tests. With many actors I have an increased spawn time that does not bother me a lot since I don't spawn a lot during gameplay but with actors it even works a bit faster than a single actor with tons of static/skeletal mesh components.

lunar grove
#

Hello, is AI sight sense always a cone? Is there a way to make it a pyramid instead?

granite robin
#

How would you handle making pedestrian crosswalks - I could see about a BP actor that is basically a nav mesh modifier and it swaps out the nav meshes, but how would you construct the logic that would make a pedestrian keep going if the nav mesh changes when they are in the middle?

#

I originally used collision boxes at an intersection but it became an organizational nightmare because there were so many of them to deal with (2 per each corner)

astral sinew
uncut slate
granite robin
# astral sinew NavLinkProxies maybe to connect the 2 sides of the road? You can dynamically ena...

So if I did a nav proxy, I could keep them always enabled but just change the cost of the nav mesh modifier? The tricky part is making the AI wait like a person would instead of looking at the high cost and then routing around it although I guess if all the cross works were my cost it wouldn't try to route around it per se? I wish there was a system already in place that I can just buy off the marketplace like traffic systems

#

Right now the two edge cases I'm dealing with are 1- making them wait in place for the light to change , 2- making them continue once like changes but they're in the middle of the cross walk

#

But an ideal system would take into account the actual crosswalk light - If I did that I'd be able to set up a timer that just made their AI wait

astral sinew
#

However no clue how scalable this approach is. Another option might be making the crossings smart objects with slots that pawns can occupy until the lamp turns green and then in the smartobject behaviour you let them cross the road by modifying their navigation class or just simply telling them to walk to the other side. Again only problem with this approach is scalability as in maximum concurrent pawns being able to use this system. No clue if smart objects have a slot that can take "infinite" pawns or every slot can only have one occupant.

granite robin
uncut slate
granite robin
astral sinew
uneven cloud
granite robin
uneven cloud
ocean wren
fathom dome
#

I'm so confused

#

adding nav mesh invoker

#

and having a tiny navmesh bounds

#

literally drops my fps from 120 to 30 by stepping into it

#

all default setting

#

it seems like even tiny amounts of navmesh are taking rediculous resources for me and I don't see it elsewhere

uneven cloud
fathom dome
#

not this expensive

#

this is unusable expensive

#

just to be clear a 1m^3 drops the fps by 20 and it's not even big enough to have one AI in it

#

that's not normal

#

it also runs much cheaper on a fresh project, practically free

#

so clearly there is something I'm missing

#

but I can't figure out the difference since i follow the same steps in both projects

#

I'd stream it in the voice chat to show whats up but i'm between microphones

lyric flint
vestal gale
dense owl
fathom dome
#

yeah good call

fathom dome
#

would anybody here be so kind as to show what a good example of efficient use of navmesh invokers? I think having a better understanding of what a good situation looks like might help me a lot. Like just some settings or what your navigation profiling looks like. THank you!

#

what i have just looks nothing like the videos and they never seem to show much of the details

uncut slate
#

Why would this break my ai ? without it everything works fine, with it after a few plays the ai just stops working

real arrow
#

do I need to override abort for a task to abort properly and move on to a different node

#

considering that I don't need any custom abort behavior

dense owl
real arrow
#

I just mean like

#

do I have to override it

uncut slate
dense owl
dense owl
uncut slate
#

it's a function

#

it's on the end

real arrow
#

I'm just trying to ask if the behavior tree system breaks when I don't override abort and it tries to abort

#

I've ran into werid issues when I didn't manually override abort before and I didn't know if that was the issue, or if it was something else. I'm assuming it would be something else since it doesn't make sense for a user to always have to implement abort for every task, when they don't need any custom behavior

#

I'm moving tasks to c++ now just for fun, and so I'm trying to make sure nothing will break

#
EBTNodeResult::Type UBTBreakVehicle::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
{
    return EBTNodeResult::InProgress;
}

void UBTBreakVehicle::TickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
{

    //UDrivableVehicleComponent* VehicleComp = OwnerComp.GetOwner()->GetComponentByClass<UDrivableVehicleComponent>();
    UChaosVehicleMovementComponent* MovementComp = OwnerComp.GetOwner()->GetComponentByClass<UChaosVehicleMovementComponent>();

    if (MovementComp->GetForwardSpeed() < 10.0) {
        FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded);
    }
    else {
        MovementComp->SetBrakeInput(1.0);
    }

}

#

like here is a very simple task I made to make a vehicle break until it is going less than 10 uu, was just wondering if this looks all setup correctly since it's my first c++ task

dense owl
uncut slate
#

yes

dense owl
#

Ok, so you’re calling a function that’s supposed to run in one tick, several times and this function calls an event that has a delay (latent action) in it, do you see how that could cause issues?

uncut slate
#

"calling a function that's supposed to run in one tick" ?

dense owl
#

Yeh, functions run in one tick, they do not support latent actions

uncut slate
#

so it doesn't matter if it's in the event

#

because i run it from a function ?

dense owl
#

Yes but even tho you’re calling the event at the tail end, it’s prly getting bottlenecked inside the event because of that delay

#

Ultimately you’re calling an event that’s already busy trying to complete, so it tries to start it again, but then the delay is over and it jumps

#

Delays cause all kinds of problems 😀

uncut slate
#

without the delay and trying to play the montage breaks it as well

#

and the montage shouldn't be run that much

dense owl
#

The montage is also latent

#

If you’re calling that event on tick, you’ll have the same issues

uncut slate
#

how would i go about doing a hit reaction then, i followed a tutorial mostly

dense owl
dense owl
uncut slate
#

ok, i'll have to look into that

real arrow
#

also since it looks like you're doing it without a behavior tree

#

(which, you probably should be)

#

I would manually code in that gate with a bool and branch instead of doing the do once node

vestal gale
wraith robin
#

This is from engine code:

UBTDecorator_CheckGameplayTagsOnActor::UBTDecorator_CheckGameplayTagsOnActor(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
    NodeName = "Gameplay Tag Condition";

    // Accept only actors
    ActorToCheck.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTDecorator_CheckGameplayTagsOnActor, ActorToCheck), AActor::StaticClass());

    // Default to using Self Actor
    ActorToCheck.SelectedKeyName = FBlackboard::KeySelf;

    // For now, don't allow users to select any "Abort Observers", because it's currently not supported.
    bAllowAbortNone = false;
    bAllowAbortLowerPri = false;
    bAllowAbortChildNodes = false;
}

Does anyone know what does the don't allow users to select any "Abort Observers", because it's currently not supported. mean? Why they are not supported? Is there going to be some ill effects if I copy this class and allow aborts?

patent hornet
#

it means you can't set that decorator to abort the part of the tree below it

#

it will not even show as an option

keen crow
#

Does BT node memory persist between multiple BT nodes executions? Like if I have a task that does some things and caches intermediate values in node memory, should I reset those variables in node memory after BT task is finished so that when I execute it again I won't get old data on ExecuteTask, or does BT component actually handles this and each ExecuteTask guaranteed to have clear node memory? 🤔

keen crow
# wraith robin This is from engine code: ```cpp UBTDecorator_CheckGameplayTagsOnActor::UBTDecor...

to expand Zlo's answer,

Why they are not supported? Is there going to be some ill effects if I copy this class and allow aborts?
they are not supported just because epics didn't implement code to observe gameplay tags changes on actor. So if you fork this node and allow aborts it won't change anything because the decorator itself doesn't call RequestExecution anywhere. So these bools are set to false just in order not to obscure users by providing flow abort options that won't work (there will literally only be None in the flow abort mode dropdown in BT editor)

wraith robin
#

Oh, now I understand. So it needs to be event based and handle listening for the tag added removed etc. Now I'm wondering is it even worth doing that in observer, when I could easily make a BTService that polls for the tag every 0.1s or so. Sure, it won't be event based, but much easier to implement.

#

UBTDecorator_CompareBBEntries seems like a good example.

keen crow
#

Yeah polling is an option, but UBTDecorator_CompareBBEntries is not an example of polling. Quite the contrary - it's an example of event-based approach - it subscribes to blackboard value changes and on event it reevaluates the decorator

#

Now another question - is there a quick way to force all items to fail in UEnvQueryTest except for iterating over all of them and calling ForceItemState?

for (FEnvQueryInstance::ItemIterator It(this, QueryInstance); It; ++It)
{
    It.ItemIterator::ForceItemState(EEnvItemStatus::Failed, 0.f);
}
wraith robin
uneven cloud
keen crow
uneven cloud
uneven cloud
uncut slate
#

i used the bt for the attack from the enemy, i need to use the bt for the hit reaction as well ?

uneven cloud
uncut slate
#

i figured a hit reaction would be pretty common stuff to do, ig i'll try some other tutorials

#

the one i used didn't have a bt, so it wouldn't be noticeable it breaks

uneven cloud
uncut slate
#

So i need to abort the whole thing if the enemy getting hit ?

#

how would i make it so i can keep punching, but he punches back sometimes ?

#

like a fight

#

i feal like if i'm punching rapidly and the bt is cancelled he won't fight back

#

hmm

#

so then the enemy attack in the bt is probably not a good spot ?

uncut slate
uneven cloud
uncut slate
#

and how would he keep fighting

uneven cloud
uncut slate
uneven cloud
uncut slate
#

hmm

uneven cloud
uncut slate
uncut slate
uneven cloud
uncut slate
#

ok i'll look into, i tried a simple additive with the punch, and also tried the idle but it failed again

#

i'll have to dive deeper ig

#

the tutorial i saw was short, and it worked for them when walking and trying to attack

copper glacier
#

Having some issues with the CharacterMovementComponent and performance. Currently I have a BaseEnemy Character, which has the simplest AI behavior tree. It moves to a chosen Goal (actor) on spawn.

My hope is to have ~80-100 of these enemies all walking to various goals at once (tower defense), but when ~15 of them are spawned, performance starts to tank. I go from 120fps to ~50. Then when I get to 20, it drops to 40, and when it gets to 30, it drops to 25, and so on.

Profiling shows it is definitely the World Tick as a result of the CharacterMoveComponent.

I have tried changing it to NavMeshWalk, enabling all the optimizations that made sense to do, but still performance just tanks, and I'm not sure why, that doesn't seem like a crazy amount of enemies to have on screen. (And render time in the profiler is fine, it is fully game thread limited, due to CharacterMovementComponent).

I tried as a test just swapping out for the FloatingPawnMovement component instead, and that has tons of problems of course, but performance stays stable for way longer (50+ enemies at 60+fps).

Is there any additional things I should look at that could be tweaked?

lyric flint
#

I'm looking into influence maps and have a few beginner questions:

  1. Is anyone using any good existing plugins off the marketplace? I did a scan, but can't find anything for 5.x.
  2. I want to discretize the world into cells. Should I do this by walking the navmesh somehow?
  3. ...how badly will world partition hurt me as I learn about this?
lyric flint
#

How difficult would it be to procedurally generate a spline path to have something like a bird fly between two points that may have obstacles between them?

uneven cloud
real arrow
#

Yeah, that is mostly just laziness from me during the prototyping process, will probably add checks soon, though everything there should always exist if it’s functioning in the behavior tree. There was one issue, and that was that I needed enable the ticking behavior in the constructor

random jay
#

(Though if you have super-low poly characters than I could see it more likely being a problem with the CMC than the animation system)

#

(My enemies also had simple logic for hit-reacts + attack, though I was dynamically moving them in/out of the animation-sharing system to support this)

copper glacier
#

Oh hell, so, I've been running it in-editor, and profiling it that way. I decided to run it standalone, to make sure I was getting a little better profiling, and the issues are pretty much gone. I go from 120fps to like 90fps after everything is spawned.
If I run in editor I get like 90fps and it drops down to 25fps once everything is spawned.

I did not realize that running within the editor viewport had such a large performance overhead

random jay
rancid wing
#

any tips or resources for stealth enemy ai?

#

like complex detection systems, for instance if the enemy says more than x amount of the players bones, it detects them, and so on

rancid wing
#

also, which ai features are c++ exclusive?

rancid wing
#

anyone??

dense owl
# rancid wing anyone??

You’re asking very vague and broad questions, less likely you’ll get an answer than asking questions on specific issues you encountered

rancid wing
#

ok , is there any features for ai that are c++ exclusive in unreal?

#

im going off of this

dense owl
#

Prly a few. Ik GameplayTagInterface has to be exposed using cpp. Why are you asking ?

dense owl
#

Realistically, you’ll need cpp at some point or another depending how much depth and performance your game needs.

vestal gale
copper glacier
# rancid wing any tips or resources for stealth enemy ai?

Take a look at the PawnSensing component. That will get you part way there. You can then combine that with custom logic when a Pawn comes into view to calculate how much of it is in view and do varying actions based on that.
Additionally you’ll also get sound sensing as part of it, and can likewise do additional logic specific to your use case

rancid wing
copper glacier
#

Using the pawn sensing component is a good starting point. You can use the FOV you setup there to do a cone/shape trace if it senses a pawn and get the bone name(s) that are hit. I am not sure however if it would return multiple bone names, but it is at least a start

uneven cloud
uneven cloud
uneven cloud
rancid wing
#

ah alright, thx!

hollow sky
#

The AI perception components are pretty nifty.

rancid wing
uneven cloud
copper glacier
uneven cloud
copper glacier
#

Yeah, I’ve mostly used official documentation, but I like to listen to YouTube tutorials occasionally so then when I’m ready to use a system I have a general idea of the terms, and usage, so I know what to lookup in that documentation 🙂

vague nimbus
#

hi, any ideas on how i can use a custom event in a task? i have tried to use casting with get player character but it give me error of "accessing none"

dense owl
vague nimbus
#

so either way it doesnt seem to work

dense owl
#

If this task is inside a BT, I imagine you’re already storing the player char in a bb key when detected so get that value and then cast

vague nimbus
lyric flint
#

In a multiplayer game, what is best practice for observing values set in an AI Controller in an animation blueprint? For example, if there is an enemy nearby, I would like the animation blueprint to play a different idle state

uneven cloud
lyric flint
lyric flint
uneven cloud
#

One the of the parameters of the add loose gameplay tags function is to have it replicated.

lyric flint
#

Great, that worked

dusty quest
#

Hello everyone. I am having difficulty detecting collision from an Env Query Item. I want to see if there is a wall nearby the possible point I want to navigate so my idea is to do a sphere trace test in the EQS to the item. But it does not seem to work as intended

patent hornet
#

Sphere trace will generally hit the floor way before it hits any nearby walls

#

Unless youre doing full get overlaps

dusty quest
#

Well I tried offsetting the item height so I would think it wouldnt hit the floor yet

#

I keep getting the whole grid regardless of the configuration so I am assuming I am not doing it right.

patent hornet
#

Extent 500 is huge

#

With that offset though

#

Your wall would need to be 2 floors high

dusty quest
#

Would it be better to work with the overlap test? I have no experience with those.

patent hornet
#

On large grid sphere trace of that size is prohibitively expensive

#

And overlap is worse

#

Id cache the wall geometry then do just pure math line box intersection

#

c+× required for custom tests of that detail

dusty quest
#

Ill give that a try. Thank you!

teal gull
#

Is there any information on games that have shipped with EQS? I can't find any information online

uneven cloud
teal gull
#

Just where I would find these games? How do you know lots of games have shipped with it? 😮

#

Been searching forever and can't find any haha

uneven cloud
#

I work in the industry and talk to others who work in the industry.

#

Like I know that Hogwarts Legacy used the EQS, because one of my coworkers worked on that game.

teal gull
#

Ah fair enough, I work in the industry too but haven't have a chance to speak with any UE devs

teal gull
#

The large disclaimers by Epic to not use it is pretty frightening when starting a project

uneven cloud
#

The EQS hasn't had any major changes in the 7 years that I've been using it.

teal gull
#

Yeah awesome, that's good to know 🙂 Cheers!

uneven cloud
#

From what I heard, they want to make some UI changes, which is why it's still experimental. However I think that's been a low priority for a long time now.

dense owl
#

Yeah if it’s been in beta for 7 years you’re prly safe 😀

fathom dome
#

what kind of setting should I be looking at for optimizing navmesh generation

#

other than tile size

#

is there a setting I'm missing to slow down how often it tries to rebuild or to make it rebuild in a less sudden and immense load?

dense halo
#

Hey, I'm running into a weird issue and I'm not sure if I'm using behaviour trees properly.
In of my selector nodes I have service, and every time the selector node finishes a task and then re-evaluates the tree and select a different task under the same selector node, my service restarts

#

it calls CeaseRelevant and BecomeRelevant, is this normal?

#

The selector node with the service does not stop being relevant since the next task to be executed is under that node, so am I doing something wrong or just not understanding BT

neat summit
#

I'm trying to create a wander behavior using State Trees and EQS and maybe I don't fully get State Trees as I thought....
I have the first State (Wander) with an EQS Task. It runs the query in the Enter State, but the query runs async and once it returns, fills the location in an output parameter.
Then, there's a child State (Move) that uses the output location as an input and creates an AIMoveTask to perform the movement.
I immediately see an issue when the EQS task doesn't return in the "Enter State" method because it is async, so when the Move Task starts, the location is not set yet.
But having sequential (non-children) states would not allow me to pass parameters between one and the other.
Any pointers on how to go about this, please?

keen crow
#

How do I utilize EQS Distance test to score items in middle range higher instead of either closer or further ones? 🤔

wary ivy
#

could you use the reference value for that?

keen crow
#

huh, looks like guys in epic gave it a thought too

wary ivy
#

there should be a "reference value" parameter under the scoring settings

#

you could also probably just return a list of all the positions scored linearly and then pick the middle item from the list

#

Reference Value

Used to normalize Test's results in such a way that the closer a value is to Reference Value the higher normalized result it will produce. The value farthest away from Reference Value will be normalized to 0, and all other values in between will get normalized linearly with the distance to Reference Value.

This option is only available for Distance and Dot Tests.

keen crow
# wary ivy there should be a "reference value" parameter under the scoring settings

oh wow there actually is. never used it before though and not even sure how to utilize it in my distance test. It's not like I can hardcode the reference values here since the range can differ from NPC to NPC and the generator range is taken from NPC's parameters. I could, however, push the mid range to blackboard and bind it to reference value... 🤔

keen crow
#

eh if only EQS assets were providing multipliers for data binding 😔

wary ivy
#

would be nice if you could just give a custom curve for normalization 😄

uneven cloud
uneven cloud
dusty quest
#

Does Find Path to location work with Navigation links?

night horizon
dense halo
#

I just turned mine into a task, after thinking about it, since I was waiting for that service to set a key. I figured I could use the parallel node to run that task and the other node I wanted

uneven cloud
night horizon
#

oh

#

is that just nested levels in the Levels window?

uneven cloud
# night horizon Im using unreal engine 4.27, I have not used world composition

So that's world composition. You can't build the nav mesh in the sublevels.

  1. Delete all nav mesh actors
  2. Your bounds volumes can be in the sub levels, but you need to also have 1 in the persistent level.
  3. Load all your sub levels in the levels window.
  4. Set your persistent level to be current.
  5. Build navigation.
  6. Save

You should have recast actors only in your persistent level. The nav data will be saved to the sub levels, but you won't be able to see that.

night horizon
#

also, do world settings matter here? what about Force Rebuild on Load in project settings or in the recast asset settings?

#

I end up with nav meshes all over the place when I build all of them together:

#

its builds the navmesh as if all of the levels are combined into one

copper glacier
#

If you add multiple decorators to a behavior tree sequence, are they OR or AND'd together?

night horizon
#

but

#

if you fail a decorator check

#

it will pass over the logic so I guess its not really an OR

copper glacier
#

So if I wanted the sequence to fire if the player is not in range, but we have line of site, I just need to make sure that is in that order?

night horizon
#

I guess its more of an AND 😅

#

yes

#

if a decorator for either one of those fails it will move on

leaden frigate
#

I won't be able to respond to any answer for a few hours so please ping so I see a reply. I'm using AIMoveTo in BP to move my AI, and noticed the Finished is firing multiple times when the AI reaches it's goal. I have tried it both with and without Stop On Overlap checked, to the same result, and have code running from the Finish that should theoretically change the AIs entire state to one that doesn't run the bit of code containing the MoveTo in the first place (so when it reaches it's goal, it goes into IDLE from WANDER).

I've been able to work around this by following the finished with a DoOnce and running subsequent code out of that, the reset of which is connected to the AIMoveTo's exec pin. This does seem to fix the issue, but it seems hacky, and was wondering if anyone else has experienced code firing multiple times out of an AIMoveTo's Finished pin?
Edit: 4.27.2

uneven cloud
leaden frigate
dense owl
#

That seems like a backwards approach

#

UE has some bugs, but when you do encounter them there might not be a “known fix”, or easy to implement. better to start from the premise Luthage mentioned

leaden frigate
#

I just don't want to bang my head off the wall trying to debug something that's a known issue simply because I don't know it's a known issue, when in most cases it only takes seconds to figure out if it is. You don' t know what you don't know, after all 🙂

#

(I should clarify that I meant I always assume it's my fault before assuming engine bug)

#

The folks that made UE are way smarter than I am, I assume blame for simple systems not working 🤣

cunning vault
#

Do detour crowd works on UE5 already for basic pawns or still needs the complete character movement component ?

native tapir
#

I would like to explain a little bit. I don't know what causes this problem. When I replace parent enemy bp with flexible combat system parent enemy bp it fixes the issue but after a few hours later this problem happens again I don't know why
I haven't touch enemy ai blueprint yet. I just only replace animations of character. and a few changes in animation blueprint of character
after changing animations of character this problem started
there is no compiler error
nothing to find this issue
this is log warnings. I guess bp ai parent can't load mesh form data table

patent hornet
#

And former ends up by calling AddMovementInput

clever mason
#

Goal: Stop the AI from attacking during a finisher

If the finisher event is active then enemy will not play animation (attack)

dense owl
clever mason
dense owl
#

You shouldn’t have delays inside tasks

clever mason
dense owl
#

But animations within trees are a bit tricky, others might be able to give you more insight

uneven cloud
clever mason
uneven cloud
clever mason
# uneven cloud Why? That doesn't make any sense

Currently, when the player performs a special attack the AI still performs an attack animation.

Goal: Stop AI from attacking while Player performs special attack and just play victim anim instead.

uneven cloud
clever mason
fathom dome
#

so

#

what's the idea with navmesh bound volumes and infinite generated worlds?

#

are you supposed to like spawn one on each tile

#

or like just make a massive sized one

#

or is there a way to tie it to the character?

#

the invokers need them to spawn so I need to somehow always have one near moving ai right?

dense owl
#

There’s a GDC talk on Death Stranding’s nav generation

fathom dome
#

yo i'll google that

#

thank's that sounds super interesting

misty wharf
#

Anyone happen to know if there's some situation where a decorator may abort even though the check function returns true?

#

I'm having a peculiar issue where I have a decorator in my BT which is set to "abort both", and for some reason it keeps aborting itself. It does a simple value comparison with the BB, and I've verified the comparison is passing.

And yet, in Visual Logger it's clearly being rejected:

LogBehaviorTree (Log) Execution request by BT_CustomerCannotFindTapeTask::BTD_BBTag[47] (result: Failed)

#

I added logging into the decorator's function, and it returns true every single time so I don't really know what's up with it

LogBlueprintUserMessages: [BTD_BBTag_C_2] Wanted: Customer.ConversationOption.OrderItem --- Actual: Customer.ConversationOption.OrderItem --- true

dense owl
misty wharf
#

Nah it's a regular BP thing with a regular BT :) As said, it's simply doing a comparison with a == b, the log output above shows the values it's comparing, and the comparison result, which seems to indicate that it's checking it correctly

#

and the visual logger is saying the particular decorator which is passing is first being activated (as it should be), but it later requests execution again and aborts itself despite the condition still passing

hoary peak
#

My AI is being very two faced, to some locations it'll accept a partial path and to other locations it wont

misty wharf
#

It's quite big but this is the relevant part

#

Oh right and the decorator on the right should have Aborts both enabled, was just testing it with it turned off

dense owl
misty wharf
#

There's another similar one which is checking for another type of value

#

But that's not the problem as I said, this is the one which is failing

dense owl
#

Which one

#

I only see one decorator on the right

misty wharf
#

That's the one yes

dense owl
#

Ok, so your comparison passes but still aborts?

misty wharf
#

Yep, initially it passes and begins executing nodes within the sequence, but moments later it exits. Based on the visual logger output the decorator rejects, but I don't see any reason for it to do so based on the log output from the check function

#

Hence why I was wondering could there be something else that would cause the decorator to abort besides just the check function

#

(Removing "aborts both" from the decorator causes it to no longer abort and it works as expected in this specific scenario)

#

I would have thought that the BB value it checks changes and that causes it to abort, but the logging seems to suggest the value never changes

dense owl
misty wharf
#

Yeah that's also what I did, it seems to support the visual log output

dense owl
#

So the comparison never fails, but it still aborts?

misty wharf
#

Exactly

dense owl
#

Is there anything under it that could be failing, causing the tree to abort up?

#

Or is it not even getting that far

misty wharf
#

It starts running a node which plays some speech, but that one can't even fail/abort

dense owl
#

Very odd. I’d honestly do an engine restart just for sanity check. I had an issue yesterday where a function never fired for some reason and restarting the engine fixed it lol

#

Doubt it’s that but 🤷‍♂️

misty wharf
#

Yeah it's not that either :)

#

Maybe this is the sign that's telling me I should refactor this part of my behavior trees because it's a bit clunky to handle conversations within it anyway lol

dense owl
#

Maybe. I think there’s some dialogue plug-ins out there that can make your life easier

misty wharf
#

Yeah might try using FlowGraph for it, think I've seen folks use it for that purpose. My convesation choices are not super complex anyway

dense owl
#

I may have heard people here say BTs are not the way to go with dialogue anyway

misty wharf
#

Yep :P

cold surge
#

Hey Guys, I don't really know where this belongs..
But I'm tryign to use the Navigation Invokers and Dynamic setting as portayed in a lot of YT Tuts.
However my Animals completly tank my performance with there Invokers..
Is there any way to optimize this? I don't understand why it's so terrible..

Second picture (with hte car) has the Navinvokers on the Static Spawners of the animals.. Why does this work so shitty?

quaint marlin
#

I see "Behavior trees and EQS" at the top. Is this also the channel for Statetrees, or am I missing a Statetree specific channel

lunar niche
#

Is this a good one week plan for learning basics of AI?

Day 1: Introduction to AI in UE5
-Start by familiarizing yourself with AI-specific features and tools within UE5.
-Explore the UE5 AI documentation and available resources.

Day 2: Behavior Trees and Blackboards
-Dive directly into Behavior Trees and Blackboards, the core of AI decision-making in UE5.
-Create a basic Behavior Tree for an AI character.

Day 3: Implementing Basic AI
-Learn how to create AI characters and integrate them into your project.
-Set up simple AI behaviors like following the player or patrolling.

Day 4: AI Perception and Sensing
-Explore AI perception components, senses (e.g., sight, hearing), and how to use them.
-Implement perception systems for your AI, allowing them to detect the player.

Day 5: Advanced AI Techniques
-Study advanced topics like EQS (Environment Query System) and AI task systems.
-Experiment with more complex AI behaviors, such as decision trees or state machines.

Day 6: Optimization and Debugging
-Learn about optimizing AI and game performance.
-Profile and optimize your AI code and game.
-Debug any issues in your AI behaviors.

Day 7: Project Enhancement and Review
-Enhance your UE5 project by adding more advanced AI features or improving existing ones.
-Conduct thorough testing and debugging.
-Document your project and review what you've learned.

This one-week plan assumes you have a strong foundation in UE5, so you can focus on AI-specific aspects. While this accelerated approach can provide you with a basic understanding of AI in UE5, keep in mind that becoming proficient in AI development typically requires more time and practice.

Asked for a planning from chatgpt since someone mentioned it's good to use for planners

lyric flint
#

Howdy, are there any nodes available to set any of these settings in a blueprint for the perception component?

uneven cloud
uneven cloud
cold surge
night horizon
#

@uneven cloud do you know if theres a way in UE4 to bake static navmeshes into sub-levels and have that navdata stream in when the level is streamed? I guess I have a weird setup where Im trying to dynamically stream in sub-levels that occupy the same space, but only one of them is active at a time (before they get unloaded and a new one is brought in)

#

I feel like Ive tried every possible combination of settings but had no luck getting the desired result

#

I think there is, but have you made sure the target location is on the navmesh to begin with?

stark tangle
#

why Attack task here is running only once?
he's not going to CD, just never runs again after a first time

uneven cloud
night horizon
# uneven cloud Yes there is. However, the streaming the sublevels to the same place is likely ...

I did a write up here on the forums about some of the details of what Im trying to do: https://forums.unrealengine.com/t/navmesh-of-sublevel/35996/30

#

Im essentially loading in geometry from sub levels thats static into an arena

uneven cloud
#

What kind of information are you looking for? If it can't find a path, then you aren't going to get much from debugging the A*.

night horizon
#

though the geometry is static the entire time its active, the arena itself is dynamic in that it can load in different premade levels

uneven cloud
night horizon
uneven cloud
#

Is your secondary uworld able to log to the visual logger? In normal cases you can log out where it's tried. I've just never seen that actually be useful.

uneven cloud
night horizon
#

so something tells me that the navmesh, which shouldnt be changing at all, is still evaluating its state or doing pointless updates since my CPU usage is so high

#

thats why Id like to be static but have not found a way to do so 😭

#

ive tested this on a very simple rectangular navmesh setup that doesnt dynamically load in any new geo

#

and I saw the same CPU usage hit

uneven cloud
night horizon
#

Ive gone through every component of my enemy AI blueprints to make sure nothing on them affects navigation too

#

but that didnt seem to fix anything

dense owl
stark tangle
dense owl
#

If target set = false, it’s obviously not set

#

And you’re prly not forcing the tree to re-evaluate so it gets stuck in the right branch

stark tangle
stark tangle
dense owl
#

Watch the tree at runtime, hit pause, and use the arrows to see what happens

lyric flint
#

When is worth it use StateTrees?

terse panther
#

Hey, can anyone tell me how can i provide custom path points to my controller and let path following component use these points instead to finding a path....

I got a function inside of path following i.e. UPathFollowingComponent::RequestMove(const FAIMoveRequest& RequestData, FNavPathSharedPtr InPath) to perform the move to...
but i am not getting how to feed custom path points to InPath parameter...

any help 😦

junior jasper
#

is there a way to make visible in run time the information in the detail panel of nodes in the behaviour tree editor? I tried with VisibleAnywhere, but it kinda doesn't.

misty wharf
#

I don't think so. Your best bet would be to write the values into the BB

#

(or any of the logging facilities)

rapid birch
#

Hi.

#

Why is my AI not moving at all? Just a simple move to location or actor node doesnt work!!

leaden frigate
#

Need more info, could be lots of things. Did you set your pawns controller? How are you calling the MoveTo? Do you have a navmesh? People need info to help 🙂

rapid birch
#

nahh, just unchecked some thing in that node

#

and checked bac

#

and now it works

#

i tell you unreal is weird.

#

unchecked projection and put it back

#

tried even deleting recast and that did not do the trick

hot narwhal
#

Hey, i have a simple AI that just follow the player and attack it when it is close enough but i'm having an issue where when the bot kills the player, it crashes with this error :

Assertion failed: !ErrorDetected || GIsAutomationTesting [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h] [Line: 90] 
Acquiring a write access while there are ongoing read or write access

Does anyone know why.

Here's also a screen of the behavior tree. The BTS_Attack just checks if the distance is less than 150 and if it's the case, it attacks

rapid birch
#

yeah but what that does

#

show bp and bb etc

hot narwhal
#

The BTS_Attack and the gameplay ability that is called

#

but it basically just applies damage to the player and if the life is less than 0, the player is destroyed

rapid birch
#

u can try disconnecting assign and see if that helps

#

u are by error doing some writing

#

"Acquiring a write access while there are ongoing read or write access"

#

also u can just see if you fire that event manually and see if it crashes

#

i think it could be that get ability and assign stuff happening almost at the sametime

hot narwhal
#

I'll try that to remove the destroy part of the death to see if it still doing the error

#

ok it seems that if i don't destroy the player when i kill him, the error is gone

real arrow
#

I don’t know what’s causing the error but activating a GAS ability every tick in a service node doesn’t seem like a very good practice

rapid birch
#

yup xD

#

did not even notice it in the left pic

hot narwhal
rapid birch
#

still, i would not put it in tick

#

x)

#

and assuming you are not experienced with unreal, skip the whole GAS system xD

hot narwhal
#

i pretty much copied the way they setup lyra bot firing

hot narwhal
real arrow
#

I think gas is at times multithreaded so that’s probably what’s causing your issue

hot narwhal
hot narwhal
rapid birch
#

good for you

#

you are better human than me

hot narwhal
#

I'll debug further

hot narwhal
real arrow
#

I still don’t understand, show the code for your service

rapid birch
#

i said 😄

real arrow
#

No sorry your service

hot narwhal
real arrow
#

Oh sorry I see it now

hot narwhal
#

for this part i pretty much copied the way they do in lyra

#

i'll try to give the ability to die back to the player but i will remove the destroy part to see if it is related to the entire ability or only the fact that the player is destroyed at some point

real arrow
#

I mean, there are errors you will have, I’m just trying to figure out how it would be related to other threads

hot narwhal
#

okay so after testing, it definitely comes from the fact that the player is destroyed

real arrow
#

Yeah

hot narwhal
#

so it is not directly related to the death ability

#

Maybe because the bot tries to acces the player as a target but the player doesn't exist anymore

real arrow
#

Yes that and your EQS context is probably failing

hot narwhal
#

yep

real arrow
#

But eqs shouldn’t be multithreaded so

hot narwhal
#

i should check in lyra how do they handle this

leaden frigate
#

Couldn't you hack it with an IsValid branch and account for player death? Set to idle if not valid or somesuch?

hot narwhal
#

ooooh i might have an idea

#

i'll test something i'll keep you updated

#

okay i tested a feww things, i've removed everything from the behavior tree of the bots, and even after that, the game crash if i destroy the player

hot narwhal
#

@real arrow it seems that you were right with the thread thing, i got this error that i didn't see

Another thread asked to have a read or write access during this write access
#

Ok i found the source of the error

#

But i really don't know why it causes such errors

#

It comes from the AI perception

#

if i deactivate the sight perception it works like a charm

neat summit
#

Is there no way to properly organize the order of properties in State Tree tasks/evaluators/etc? They all show up in seemingly random order (within input/output/parameter categories). It's a bit odd to see that random bag of properties not grouped in a meaningful way.

ancient wedge
#

Anyone knows what this means? Didn't know the abilitysystem had anything with smart object 😄

stark tangle
#

AI Stimulus gives me a stimulus location, but how can i get an object, which is stimulating an actor ?

north oriole
#

why by using a navmodifier or dynamic obstacle on a box collider the navmesh modified by it always exceeds its borders by quite a lot?is it possible to modify the navmesh only precisely where the box intersects with the floor?

uneven cloud
north oriole
subtle sleet
#

Hello, I have floating pawns going to a random location every few seconds, but they do strange things when they collide (with an other pawn). I see read on the internet that you can turn up RVOAvoidance if you use CharacterController, but I use floating pawn. Is there a easy way to let them not collide in a weird way?

soft nova
#

hey im trying to get my enemy to move towards my tower in game

#

im using this blueprint and its not working

pallid mica
#

The Character class has a lot built in. If you don't want to use that you'd need to custom code it fwiw. There are interfaces to use for RVO iirc, so Character might not be necessary, but I don't think that's available at all in BPs (in case you can't use CPP)

pallid mica
soft nova
keen crow
#

How is dynamic navmesh regenerated when I move an object on the level during gameplay in terms of does it regenerate entirely in the whole volume, or does regeneration happens only on the tile (and maybe adjacent tiles) where the geometry and hence navmesh has actually changed?

pallid mica
#

If you call this on an invalid controller it will of course not work

#

Try calling your code from Event Possessed and use the Controller input the node Event gives you

#

Might need to cast it to AiController

soft nova
pallid mica
#

It would either give AccessedNone error If accessed anyway or you would use an IsValid check where you could print on the not valid pin

#

Are you setting that variable anywhere?

soft nova
pallid mica
#

I already gave you an alternative

#

Do that please

soft nova
#

Cast to Aicontroller?

pallid mica
#

Just read the whole thing

soft nova
# pallid mica I already gave you an alternative

what alternative are you specifically referring to? Event Possessed wouldnt work as I dont have a main controller. I can try casting it to AIController, just lmk what your specifically referring to please

pallid mica
#

Why don't you have a Controller possessing the pawn?

#

I'm referring to the Possessed one yes

soft nova
#

Im not possessing it tho?

pallid mica
#

An AI is usually possessed by an AIController

soft nova
#

which one of these do I add?

pallid mica
#

What is that dropdown

soft nova
#

for components

pallid mica
#

Why would that be needed?

#

AI Controller is not a component

soft nova
#

idk ive always added controllers via component menu

#

oh shit, what is it under?

pallid mica
#

Eh. It's a Actor. Usually Characters placed into the scene or spawned have a default AIController assigned

#

It's a setting in the Character itself

soft nova
#

are you talking about this?

pallid mica
#

Yes

#

Are you AI spawned or placed?

soft nova
#

its spawned

pallid mica
#

Then change the top drop down to Placed and Spawned

#

And then please try the solution with the Possessed Event

#

And remove your EnemyController variable

soft nova
#

It cant slot into the first slot instead of EnemyController

pallid mica
#

Okay, you will need to use Event Possessed where you have BeginPlay atm

#

Otherwise your GetActorOfClass won't be calling

#

And I also wrote that you might need to cast the NewController pin to AIController

#

Because NewController is of Type AController which is parent class of AAIController (as well as APlayerController). The MoveToLocationorActor node probably wants an AIController, so you need to cast.

soft nova
#

when would I be calling on the possessed event?

pallid mica
#

You don't call that

#

It's called by the Engine when the Pawn/Character gets possessed

#

Which happens "Automatically" due to the DropDown you changed earlier

soft nova
#

ah ok

pallid mica
#

Since you require a valid AIController, it's much better to use Possessed instead of BeginPlay, because Possessed is the Event that calls when a Controller should be valid :P

#

at least on the Server, but that's a different story and AI is Server only anyway, so doesn't matter

soft nova
#

where do I connect the NewController?

pallid mica
soft nova
#

like this?

pallid mica
#

Also you should think about sooner or later replacing GetActorOfClass with something "better". That node is just an escape from proper coding

#

But not important for now

soft nova
#

oh yeah im also dealing with my previous code breaking and idk how to fix it

uneven cloud
# soft nova hey im trying to get my enemy to move towards my tower in game

Does your tower block the nav mesh? Likely can't reach it. Try projecting to the nav mesh with an extent to find a location near the tower. Then send your new location instead of the actor. You can check the visual logger (tools/debug) for the error of failing to project if you are passing an unreachable location.

uneven cloud
uneven cloud
pallid mica
#

Doesn't change what I said

#

Beginners tend to use that instead of properly setting up a system that allows easier access to their Actor Instances

uneven cloud
#

It does. You don't need to shame a hobbyist for using it.

pallid mica
#

I don't shame anyone lol

uneven cloud
#

"an escape from proper coding" is shaming.

pallid mica
#

This is similar to other things in UE. E.g. Widget Bindings. Sure you can use them, but they are highly unperformant compared to not using them

uneven cloud
#

Perf isn't black and white like that. Underperformant is only a problem when it becomes a problem. A beginner hobbyist is unlikely to have problems with those nodes, especially compared to all the other ridiculous things they might try to do.

pallid mica
#

All valid, GetActor(AllActors)OfClass can still be easily avoided. I stand by my opinion that it should not be used if not being the only way

uneven cloud
#

It can be avoided completely, if you know what you are doing. But often it's completely unnecessary. Dev time should always be weighed with perf costs. Especially with beginners who struggle with the "better" ways.

vague nimbus
#

yo, is it possible to make a box collision into a task?

uneven cloud
uneven cloud
#

Do you want to turn on collision in a task? Do you want to listen for collision events in a service? What are you actually looking for?

vague nimbus
#

i want to turn collision into a task i guess

dense owl
#

That makes no sense lol

vague nimbus
#

like in behaviour tree task

uneven cloud
#

Turn collision into a task? That doesn't make any sense

dense owl
#

Ya we know what tasks are, do you know what a box collision is tho?

vague nimbus
#

yes i guess

north oriole
dense owl
# vague nimbus yes i guess

Again, explain what it is you’re trying to achieve with this, not “turn collision into a task” because that makes no actual sense 😀

uneven cloud
north oriole
#

Maybe it's just broken in 5 sadly

vague nimbus
uneven cloud
# north oriole Thx anyway🙏

It's weird for it to be broken. It's worked for many years. Is there a bool option that sounds like it has something to do with the extent? I can't look, because enabling recast would break my project.

north oriole
uneven cloud
uneven cloud
uneven cloud
north oriole
#

Also, i tried setting the box to be a dynamic obstacle directly instead of using the navmodifier, but it still has exactly that same extent

uneven cloud
worldly crane
#

Little bit of a newbie question but how expensive are typical heuristic based AI like behavior trees compared to learning agents at runtime?

uneven cloud
soft nova
long sorrel
#

what is better make own ai class and make it with c++ our use beaver tree for make ai

soft nova
uneven cloud
soft nova
uneven cloud
uneven cloud
soft nova
uneven cloud
soft nova
#

Oh yeah, I just meant the waves and at then end of a wave you get to pick an upgrade. The stats will reside in the pawns tho

uneven cloud
#

If you use IS A (class) and HAS A(component), it really helps thinking about it logically

lyric flint
#

GPU is maybe different. It’s so very use case specific though that the answer to your question is almost meaningless.

karmic pelican
#

Then add the upgrade system (ActorComponent) into your Tower Actor(actor)

#

Then create child blueprints.

stone hamlet
#

Hi, I'm noticing its hard for me to tell whats happening in my Ai BP here because its just erratically flickering and hard for me to debug whats happening in the behavior tree. Is there something I'm doing wrong? The tree is acting as it should in game but it looks crazy in my viewport. (it only seems ok at the very end beccause I hit pause, ignore that)

Even when it starts attacking (BTT_DefaultAttack) you cant see it happening in the BT.

karmic pelican
#

Is that a furry??

stone hamlet
#

no.

karmic pelican
#

Phew

#

So it's not reaching the wait node

#

Or you mean the way he's moving towards the player?

stone hamlet
#

yeah it looks like its not even reaching the default attack according to my view of the BP but in the game it looks to be working fine and reaching that point.

karmic pelican
#

Does the enemy wait 4 seconds??
These happens quite fast it's hard to notice. You can make a node only for printing and see if it's reaching that print node (there's probably other ways to test it but that's what I know for debug if it reached it or interrupted or whatever.)

stone hamlet
#

ok i can try that, where should i place the print node in the sequence?

karmic pelican
#

Just like you do with the other BTTask
But just put a print string with execute finish true, that's it

#

Again, not sure if there's a better way to test but that's how I do it

Or if we can use breakpoints?

stone hamlet
#

yeah breakpoint isnt triggering

#

btw same result even when i use this ai controller on the default mannequin

uneven cloud
stone hamlet
#

yeah looks like in the visual logger its never reaching BTT_DefaultAttack, just switches between these 2 the whole time.

#

as well as clear focus

karmic pelican
#

Try to make a custom moveTo Task.

uneven cloud
karmic pelican
#

Maybe it's not reaching the exact spot so it's failing?

uneven cloud
#

Don't guess, debug

karmic pelican
#

True

stone hamlet
#

i did find an error here

#

that remy player pawn is my player character

karmic pelican
#

It's failing on the MoveTo

stone hamlet
#

its weird because it works in game

karmic pelican
#

Yeah I saw. It's reaching a place and it's failing

#

Tye to create your own MoveTo BP Task?

stone hamlet
#

ok let me try that too

karmic pelican
#

Update?

stone hamlet
#

Sorry had to take care of some stuff

#

ok seems to be something with my enemy bp, because the mannequin now works as intented

soft nova
#

am i lost or was that something UE4 did and not UE5

dense owl
soft nova
dense owl
soft nova
dense owl
#

It’s a task he created

soft nova
#

the only task I see him creating is FindNavigLocation

dense owl
#

That’s just how he renamed his Sequence node

#

Useful to name them properly so you know what you’re looking at later

soft nova
#

ah ok, im dealing wiht slow internet

#

you wanna see my screen?

full wing
#

if i have so many bbks to make my ai to shot me, then if i come close, draw weapon, attack me, then if i lose him he sheath the weapon, is it optimal or is there a way to make it way tidier? because I feel like it is a mess tbh

dense owl
# soft nova

All good , it looks like you’ve figured it out

soft nova
#

haha yeah, I hate video tutorials for this exact reason

soft nova
dense owl
#

Yeah, I getcha and that one is one of the few good tutorials

dense owl
full wing
#

u mean like lets say Index "Fight" and if its 1 its long range fight if its 2 its chasing if its 3 its attacking?

dense owl
#

Where one branch failing leads into the next option

full wing
#

oohhh

#

damn that one way to go

#

yeah i will try that

#

thanks man

#

i see you a lot on this server answering, gj

uneven cloud
# full wing

You wouldn't need so many decorators if you used the prioritization that's already built into the tree. Higher priority should go left with lower priority to the right.

untold pebble
#

@lyric flint sorry for the ping, but you're probably the only one who knows much about the inner workings of state tree: when I bind a nested member to a task property in UE5.3, I always get the error "...but binding source type " does not match property type 'typename'"

#

No such issues in 5.2.1, so is this a known regression?

#

By nested I mean stuff like Character→MovementComponent

#

And enum compares are even more broken in 5.3, expanding them freezes the editor due to an ensure condition ("couldn't determine property copy type (MoveType→Left)") and the comparison itself also shows the same error about the property type not matching as it does for nested properties

#

Again, no such issue in 5.2.1

sweet mortar
#

i place the nav volume bounds and adjust it to the nav area
but it dosent generate
please can anyone help me solve this ?

untold pebble
sweet mortar
#

i did that

untold pebble
#

Make sure your floor can affect navigation and that debug drawing is enabled for the nav mesh

late vector
#

Hi guys I'm new here but have some questions around state trees

#

I have the same state tree on 2 AIs but only one of them calls on tick

quaint bolt
#

Hi @uneven cloud, I came across your really insightful comment earlier about doing tech demos when building a portfolio for game programmers. I’m curious if something like “smarter Pac-Man AI” would pass the bar for a sufficiently meaty demo.

The original Pac-Man’s AI is deceptively simple, but I want to jazz it up and put my own spin on the game with Unreal’s toolset, such as behavior trees, A*, EQS, AI perception, and others. Does that sound like it’d make an impressive enough demo? Or would you recommend going back to the drawing board to drum up other mechanic/system ideas, perhaps from more recent AAA games?

edit: I know Mix and Jam (https://www.youtube.com/channel/UCLyVUwlB_Hahir_VsKkGPIA) has some great demo examples, would those be valid project ideas to consider?

uneven cloud
quaint bolt
uneven cloud
quaint bolt
rigid tulip
#

Did anyone encountered in weird jitter when AI is walking on sloped surface (client only, navmesh walking only)?

uneven cloud
dense owl
#

He mentioned only happens on client so I figured it’s not an AI issue per se

uneven cloud
uneven cloud
dense owl
#

Fair enough

uneven cloud
#

I'm waiting on our movement team to fix it, so we don't use nav walking

rigid tulip
rigid tulip
uneven cloud
rigid tulip
#

Isn't that prediction?

uneven cloud
#

Client prediction only works for the owning client. Which is for player controlled actors.

That is not prediction.

#

Prediction is that the owning client responds to input before the request is sent to the server.

#

Your AI movement starts on the server and then is replicated to the clients.

rigid tulip
#

Got it thanks

uneven cloud
#

Your welcome

lilac sun
#

New to AI bur very curiois.

Would BTs be recommended for a turn based game or are there generally more suitable approaches given your AI could be computing a possible action for longer than a traditional real time game

If anybody has any resources they can recommend specific to turn based AI that would be good too

dense halo
#

Hey, if you have a custom c++ BTService node, can you stop the node memory from being cleared when it calls cease being relevant?

untold pebble
subtle sleet
#

Hey, is there a maximum range to Pawn sensing. I put the sight range very far but my actor only sees the other pawn from relative close?

full wing
#

Can some1 explain what is this thing and how can i use it?

dense owl