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 General Discussion »can you... (scripting related)

Author Topic: can you... (scripting related) (2 messages, Page 1 of 1)
Moderators: Dennis

Higuy
Joined: Mar 6, 2007

@lucasgovatos


Posted: Apr 29, 2013 06:43 PM    Msg. 1 of 2       
you would need to sleep until the device's position is equal to one, then do ai_place.

so

(script startup encounter_panel
(sleep_until (= (device_get_position panel) 1))
(ai_place encounter)
)

but if you wanted to change it back to 0 and have it so you can press it again, you'd need to make it a continous looping script, and after (ai_place encounter), you'd need to do

(sleep 10)
(device_set_position panel 0)
(sleep 10)

I put the sleep 10's in there just for good measure

That should most likely work, I haven't hsc scripted in a while but from memory that d be how I'd go about implementing it.


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Apr 29, 2013 06:49 PM    Msg. 2 of 2       
Here:

(script startup delete_door
(sleep_until (= (device_get_position "name of panel") 1))

(begin
(object_destroy "name of door")
(device_set_position "name of panel" 0)
)

)
)

syntaxes:

sleep_until <condition> (this makes the script wait until something is fulfilled before continuing)
= <variable a> <variable b> (this outputs a boolean of 1 or 0 depending on if a equals b or not)
begin <command> .......... (begin allows many commands at once to happen if they need to be in sync with eachother when they happen)

I think if you just want to make it so that actors spawn if you open a certain door, you just create a script and spawn them from behind a door that is set to 'operate from one side only'
Edited by OrangeJuice on Apr 29, 2013 at 06:51 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:59 AM 157 ms.
A Halo Maps Website