Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Dark AI Run Away Stance Help

Author
Message
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 8th May 2009 06:44


I'm using the code above to get the enemy to run away from the Allies as soon as it targets more than one ally. But, instead of the enemy running away, he continues to fight the allies. So I tried taking away the ability for the enemy to attack the allies, but now it just stays still in a idle position. Any suggestions?
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 8th May 2009 10:32
It may be that the "AI Get Entity Count Targets" returns zero when you set it to run away, that would cause it to just alternate between the two cases every other loop making it stand still.

But thats probably not it, as have a watch print on the Targets# variable that was your line of thinking too, what does Targets# return in runaway stance?

Regards
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 9th May 2009 02:46
Thanks For Helping @Duke E

Quote: "what does Targets# return in runaway stance?"


It Returns 2.
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 9th May 2009 02:53
Nevermind, I've created a new method for making them run away by using the
to a very high number

Here the code so you can see what I am talking about better.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 9th May 2009 05:37
The entity will keep it's targets i see..

Did you use "Ai Set Entity Hit" prior to checking the "AI Set Entity Run Away When Hit"?
Many auto commands may override each other i have noticed. For instance if "Ai Set Entity Collide" and "Ai Entity Goto Position" is both called before the Ai Update. The collide sequence will be ignored and the entity will just flatten it's nose in to a wall forever =).

A workaround may be to set "Ai set entity stance Id,3" instead to set the entity for run away mode.
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 10th May 2009 06:12
Quote: "Did you use "Ai Set Entity Hit" prior to checking the "AI Set Entity Run Away When Hit"?"


No.

Quote: "A workaround may be to set "Ai set entity stance Id,3" instead to set the entity for run away mode. "


I already tried that, but it wouldn't work.

Login to post a reply

Server time is: 2024-03-28 21:40:06
Your offset time is: 2024-03-28 21:40:06