Run away from, run towards

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Run away from, run towards

Post 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?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Ai properties

Post 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 .
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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?
Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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...
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

hey i got an idea.

maybe i can make him face the target, then run backwards?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

sort of like the mindist in their properties...
Post Reply