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 »Dropship respawn script

Author Topic: Dropship respawn script (3 messages, Page 1 of 1)
Moderators: Dennis

deadlyfighter1000
Joined: Jan 11, 2009

Constantly a threat.


Posted: Nov 19, 2012 12:06 AM    Msg. 1 of 3       
Okay, so in this script,

(script continuous dropship1
(sleep 2000)
(object_create_anew dropship1)
(ai_vehicle_encounter dropship1 dropship1)
(unit_close dropship1)
(ai_place dropship1/dpass)
(vehicle_load_magic dropship1 "passenger" (ai_actors dropship1/dpass))
(object_teleport dropship1 dropship1)
(recording_play_and_hover dropship1 pipe_cship_drop)
(sleep (recording_time dropship1))
(unit_open dropship1)
(sleep 50)
(vehicle_unload dropship1 "")
(sleep 250)
(vehicle_hover dropship1 false)
(recording_play dropship1 pipe_cship_exit)
(sleep 50)
(unit_close dropship1)
(sleep 900)
(object_destroy dropship1)
(sleep_until (= (ai_living_count dropship1/dpass) 0) 15)
(sleep 2500)
)

I want to make it so that if the dropship dies at any point, the script merely restarts from the beginning, how would I do that? The script works completely fine - just that if the dropship dies before the script completes, the script become 'broken' persay. Thank you!


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Nov 19, 2012 02:34 AM    Msg. 2 of 3       
At what part of the script does the script fail?

And the dropship can't die if its just a vehicle with a recording. Do you mean that it disappears and doesn't return?

If that is what you mean then I'd say to...
For test purposes decrease the two sleep commands at the start and finish because you would have to wait 150 seconds for it to respawn otherwise and that may cause you to think its not spawning because you have up waiting.


nihao123456ftw
Joined: Mar 24, 2012


Posted: Nov 19, 2012 06:57 AM    Msg. 3 of 3       
well i tried but this is all i got (i doubt it will work)



(script continuous blahblah)
(if (= (unit_get_health dropship1) -1));; maybe it's supposed to be (if (= (unit_get_health (unit (dropship1)) -1)) or something idk
(sleep -1 dropship1) ;;Hmm... this might just pause the dropship1 script at whatever action it needs to perform next and not actually reset it
(sleep 2500);;This gives a 2500 cooldown just like after the wave of enemies are destroyed in your script
(wake dropship1) ;;And then this might just wake up the script from sleeping from whatever command it was going to perform next and do it.
;;EDIT hey wait, maybe you can just have (sleep 2500 dropship1) instead...
)
;;Still might work though

(script continuous dropship1
(sleep 2000)
(object_create_anew dropship1)
(ai_vehicle_encounter dropship1 dropship1)
(unit_close dropship1)
(ai_place dropship1/dpass)
(vehicle_load_magic dropship1 "passenger" (ai_actors dropship1/dpass))
(object_teleport dropship1 dropship1)
(recording_play_and_hover dropship1 pipe_cship_drop)
(sleep (recording_time dropship1))
(unit_open dropship1)
(sleep 50)
(vehicle_unload dropship1 "")
(sleep 250)
(vehicle_hover dropship1 false)
(recording_play dropship1 pipe_cship_exit)
(sleep 50)
(unit_close dropship1)
(sleep 900)
(object_destroy dropship1)
(sleep_until (= (ai_living_count dropship1/dpass) 0) 15)
(sleep 2500)
)


if this doesn't work, maybe someone more epic will manage to help you better, sorry ;-(
Edited by nihao123456ftw on Nov 19, 2012 at 07:04 AM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 3:42 AM 172 ms.
A Halo Maps Website