How to stop seeking when shooting?

ShadowZie

Member
Hey, I want the ai to stop seeking when shooting

I tried with bool and then setting and unsetting it but for some reason, it won't stop
And I tried with the interrupt task but it does nothing
What is the best way to do it? my shooting task is working

Screenshot_10.png
 
You can use conditional aborts to interrupt an active task. If you take a look at the Behavior Designer videos page there is a video where I go over how aborts work.
 
You can use conditional aborts to interrupt an active task. If you take a look at the Behavior Designer videos page there is a video where I go over how aborts work.
But the conditional aborts will only interrupt the task that is on the right side of it,
My tree is searching for the target and then to the right of it he is checking if he should shoot or melee, I want him If he is shooting he will interrupt the seek and stop moving and if he stopped shooting he will start move again so he will stop interrupt it
 
You should restructure your tree so seek is to the right of it. I do something similar with the Deathmatch AI Kit tree. You can see how this tree works on:

 
You should restructure your tree so seek is to the right of it. I do something similar with the Deathmatch AI Kit tree. You can see how this tree works on:

Is there any other way to do it?

Another thing I have the movement pack and I am looking to look at or rotate towards , so it will rotate to target but smooth, I tried some of the actions but most of them are not smooth they are snapping to them, i need the rotation to be smooth,
Do I need to create it? or there is one that I can use in the behavior tree
 
Another thing if you can help me with,
The ai works perfectly when there are one or two but if there are 5 or 10 AI and they have the same target they start running in circles around the target
Any tip on how to prevent it?
 
Is there any other way to do it?
If you want to use conditional aborts then you need have the interruptable tasks on the right. You can also use the Interrupt/Perform Interruption tasks to manually stop another task but in this case I recommend using conditional aborts since it's a lot easier.

Another thing I have the movement pack and I am looking to look at or rotate towards , so it will rotate to target but smooth, I tried some of the actions but most of them are not smooth they are snapping to them, i need the rotation to be smooth,
Do I need to create it? or there is one that I can use in the behavior tree
There is a delta parameter within Rotate Towards that controls how fast the agent rotates.

The ai works perfectly when there are one or two but if there are 5 or 10 AI and they have the same target they start running in circles around the target
Any tip on how to prevent it?
You will need to set different targets for each AI.
 
If you want to use conditional aborts then you need have the interruptable tasks on the right. You can also use the Interrupt/Perform Interruption tasks to manually stop another task but in this case I recommend using conditional aborts since it's a lot easier.


There is a delta parameter within Rotate Towards that controls how fast the agent rotates.


You will need to set different targets for each AI.
Thank you for helping me :)
Do you have a tip on how to select a random/different target? I am using the search and within range to search
can I get more then one target or something?
 
In that case I recommend creating your own task that does its own target selection. At the very least you could select a random target within a given radius. As an example within the Deathmatch AI Kit I created a new task that has some logic to determine where the agent should move based on the current game scenario.
 
If you want to use conditional aborts then you need have the interruptable tasks on the right. You can also use the Interrupt/Perform Interruption tasks to manually stop another task but in this case I recommend using conditional aborts since it's a lot easier.


There is a delta parameter within Rotate Towards that controls how fast the agent rotates.


You will need to set different targets for each AI.
About the rotation, Can you explain to me how to do it? I have the target as gameobject I tried 3 of them but it won't work
it has like laggy rotation and not smooth
 
If you want to use conditional aborts then you need have the interruptable tasks on the right. You can also use the Interrupt/Perform Interruption tasks to manually stop another task but in this case I recommend using conditional aborts since it's a lot easier.


There is a delta parameter within Rotate Towards that controls how fast the agent rotates.


You will need to set different targets for each AI.
I got it, because I set update interval for 0.2 it does that,
Is there any other way to fix it? then setting it to every tick
 
Top