Page 1 of 1

Run away from, run towards

Posted: Tue Jun 17, 2003 3:03 am
by Alcoholic
how would i get a soldier to run away from a target, as long as where he runs to meets specific distance requirements? how would i make him run towards the target? its sort of like a min, max range. its also sort of like how they run away from a grenade. where is the script that tells them to run away from grenades?

Ai properties

Posted: Tue Jun 17, 2003 3:09 am
by tltrude
It's all in the ai properties (key I). Have you seen these videos, thay are great: http://www.carbongraphx.com/mohaa/video ... als/AI.zip .

Posted: Tue Jun 17, 2003 6:09 am
by jv_map
Well the run-away from grenades behaviour is in the game code, not in a script. It uses info_pathnodes with cover or concealment flag.

To script it is way more difficult since you cannot 'access' pathnodes without a targetname. I think you have to simplify your demands; do you really need them to run to a random location? Can't you just put a predefined pathnode or script_origin in the map and let the ai run to that?

Posted: Wed Jun 18, 2003 2:54 am
by Alcoholic
well basically, i have this guy that shoots at things, but he cant be closer than 256 units. if hes 256 units within the object, i want him to run away...

Posted: Wed Jun 18, 2003 2:54 am
by Alcoholic
hey i got an idea.

maybe i can make him face the target, then run backwards?

Posted: Wed Jun 18, 2003 2:55 am
by Alcoholic
sort of like the mindist in their properties...