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 »Would this work?

Author Topic: Would this work? (3 messages, Page 1 of 1)
Moderators: Dennis

Muscl3r
Joined: May 22, 2010

dont pray 4 easy lives...pray to be STRONGER MEN


Posted: Dec 26, 2011 02:03 PM    Msg. 1 of 3       
Could you attach a trigger volume to a biped so that if you used this script:

(object_attach <trigger to biped>)
(sleep until (volume_test_objects biped_trig (players)) 15)
blah

it would sleep until you got close enough to the biped no matter where it is?


E
Sorry idk why it posted two of the same topic
Edited by Muscl3r on Dec 26, 2011 at 02:06 PM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Dec 26, 2011 02:42 PM    Msg. 2 of 3       
you can only attach objects to players, not trigger volumes, if you want to see whats around players without opensauce, then do the following.

setup
(ai_attach <BIPED1> <ENCOUNTER>)
(ai_attach <BIPED1> <ENCOUNTER>)
(ai_look_at_object <BIPED1> <BIPED2>)
(ai_look_at_object <BIPED2> <BIPED1>)
(objects_attach <BASE_OBJECT> "<MARKER_BIPED1>" <BIPED1> "")
(objects_attach <BASE_OBJECT> "<MARKER_BIPED2>" <BIPED2> "")

you can replace the ai_attach and biped places with just an encounters and squads with stuff like (list_get (ai_actors <encounter\squad>) NUMBER), but whatever.


and then in the place of the volume test,
(and (objects_can_see_object <BIPED1> (unit (list_get (players) NUMBER)) 45) (objects_can_see_object <BIPED2> (unit (list_get (players) NUMBER)) 45))


When two bipeds see the same player, they return true and continue the if or sleep_until condition. The setup puts them on whatever object, and makes them stare at each other.


Anyways, if you want to build your own copy of opensauce, or when the installer becomes public some time in the future, you will be able to use (objects_distance_to_object <object_list> <object>) to get the World Units between two items, and check for certain distances to do things, or recover someones health based on distance, etc.


Muscl3r
Joined: May 22, 2010

dont pray 4 easy lives...pray to be STRONGER MEN


Posted: Dec 26, 2011 03:02 PM    Msg. 3 of 3       
thanks!

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 10:46 AM 172 ms.
A Halo Maps Website