A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Script question

Author Topic: Script question (2 messages, Page 1 of 1)
Moderators: Dennis

Smok Niszczyciel
Joined: Aug 12, 2010

Where the laws of physics don't exist...


Posted: May 31, 2011 10:35 AM    Msg. 1 of 2       
Is it possible to use IF statements to change AI states?
For example: if this squad has over 50% dead units, then sit in base and just wait for more to respawn, and if over 50% unis are alive, then follow the command list to enemy base.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 31, 2011 01:25 PM    Msg. 2 of 2       
(script continuous rawr
(if (> (ai_living_fraction [ai]) 0.5) (ai_command_list [ai] [ATTACK_command_list]) (ai_command_list [ai] [FLEE_command_list]))
)


Or, you can use (ai_set_current_state [ai] [ai_default_state]) to try to make them do their default flee settings in their tags, but if you want them to hide in their base, then the top with the command list for fleeing is what you want.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 1:41 AM 140 ms.
A Halo Maps Website