|
Post by drongophat on Aug 11, 2017 10:15:06 GMT
Hey There Anyone with a bit of knowledge on this, is much appreciated!
My AI Bots, both enemy and Companions, When i start the game or they are triggered in, they will perform one kill and then walk away. If they are struck during the time they walk away. they will start to Attack again and then once again walk away.
i Set in Waypoints. they would go to and from, and still continue the same action.
Basically its one Kill. then run away to where they started and to the idle state.
I imagine this has something to do with a Raycast, or The SphereDetection...
but i'm completely Stumped on this one.
DrongoPhat.
|
|
|
Post by doinitbig on Oct 2, 2017 19:15:22 GMT
Hey guys, I'm creating a game with a war going on, and am running into a major issue. Same as what drongophat had, my enemies and companionAI will not assign a new target/vChar after they kill their current target.
After the kill, they will go back to what they were originally doing. Such as patrolling way points, or standing in a spot.
I've tried for a week or two now to debug this, but am not a strong coder. If anyone has any ideas, I'm all ears!
Also as drongophat said, if I the player, or another AI attack the broken AI, they will fight back.
|
|
|
Post by basketball1 on Oct 4, 2017 3:33:27 GMT
same help
|
|
|
Post by doinitbig on Oct 6, 2017 1:06:33 GMT
Bump?? If it's a complicated fix please let me know, I'll redesign my game to fit around the issue if so.
|
|
|
Post by Invector on Oct 6, 2017 2:35:34 GMT
Right so you setup a waypoint... but the AI returns to Idle instead of returning to the waypoint after a combat situation?
|
|
|
Post by uberwiggett on Oct 6, 2017 6:14:30 GMT
Not quite, they are saying the AI will target the player but after the player dies, they will return to their wayppint, but wont retarget the player after the player respawns and comes back unless they get attacked
|
|
|
Post by doinitbig on Oct 8, 2017 22:16:18 GMT
Basically when a CompanionAI, or an EnemyAI kills another CompanionAI or EnemyAI, the AI won't assign a new target to attack and becomes passive. This happens regardless if they are set to patrol waypoints, stay idle, chase, etc.
This has nothing to do with the player dying, because if the player dies the level gets reset. (At least in my game)
This only has to do with the AI killing another AI, and then being unable to target a new enemy. This results in that specific AI that has a kill, only attacking if something else attacks them.
For example, EnemyA and AllyA cross paths and fight each other, EnemyA wins by killing AllyA. EnemyA is now passive, and will only start fighting if it gets attacked. So if I, the player, walk in-front of EnemyA after he killed AllyA, he won't attack me at all.
If I walked in-front of EnemyA BEFORE he killed AllyA, he would target and attack me though.
For some reason the targeting is not resetting it seems.
I can record a video to clearly show what is happening if that helps! ps - thanks for the replies!
|
|
|
Post by uberwiggett on Oct 9, 2017 11:20:41 GMT
ahh ok, but yeah same issue either way, as soon as its target is registered as dead, it doesn't update to a new target, just waits. When you attack it, the target automatically updates to whatever attacked it.
|
|
|
Post by Invector on Oct 9, 2017 11:37:00 GMT
Oh right, I will take a look it's probably something making the AI goes idle or patrol after killing the first target. For the new AI we already have primary and secondary target, so this issue is not likely to happen
|
|
|
Post by doinitbig on Oct 9, 2017 17:57:33 GMT
Yeah I'm guessing when it defines a target it's just not properly resetting it or something. Awesome to hear about the new AI, if you happen to realize an easy fix for the current AI it'd be much appreciated! If not, no big deal! I'll just have to wait for the next update
|
|
|
Post by drongophat on Nov 7, 2017 2:46:46 GMT
Was there any further info on this? im still kinda having the same issue, if i attack the AI or the AI recieves damage from another whom hasnt found a target yet, that works.
but still there is no retargetting when a npc has finished killing another it just continues on the way point path until they potentially get attacked
|
|
|
Post by Invector on Nov 7, 2017 14:29:20 GMT
Did you check the option "Agressive At First Sight"?
|
|
|
Post by drongophat on Nov 11, 2017 11:59:33 GMT
Yes so far i made progress into what i wanted, turns out i needed the AI to delete after certain time, then they will retarget another no worries.
I have them aggressive at first but unfortunately they refuse to retarget another enemy/player/companion unless that deletes first.
if that makes it a little more specific.
|
|
|
Post by doinitbig on Dec 4, 2017 19:55:51 GMT
What I found was the fix for me, was that when creating your companion AI, they come with the box "Remove Components after die" checked off. The prefabs for the enemies already had that box checked, so I never compared it to the companion AI. Once I checked that box, things seemed to work fine.
|
|