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 Go to Beginning (Loop)

Author Topic: Script Go to Beginning (Loop) (6 messages, Page 1 of 1)
Moderators: Dennis

Xoronatus
Joined: Dec 6, 2010

Taking a break


Posted: Dec 15, 2010 09:18 PM    Msg. 1 of 6       
Hey Xoronatus here,

So I am making a firefight map, I have 13 waves.
I want my script to start back at the beginning once it is finished

I am not sure what the code for this would be

I want it to start at the beginning of the script at:

(script startup test)

Please Help

Thanks,
Xoronatus :)


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 16, 2010 03:40 AM    Msg. 2 of 6       
if you want it to be continuous:

(script continuous test
(BLAH BLAH BLAH)
)


rerout343
Joined: Aug 7, 2010

Targeted and Firing


Posted: Dec 16, 2010 05:04 AM    Msg. 3 of 6       
Do what every one else said just make sure your script is told to respawn wave 1. I know these aren't the exact commands but if you already have your 13 waves setup you should already know them.

script continuous name
spawn wave 1
when wave 1 dies spawn wave 2
when wave 2 dies spawn wave 3
when wave 3 dies spawn wave 4
when wave 4 dies spawn wave 5
when wave 5 dies spawn wave 6
when wave 6 dies spawn wave 7
when wave 7 dies spawn wave 8
when wave 8 dies spawn wave 9
when wave 9 dies spawn wave 10
when wave 10 dies spawn wave 11
when wave 11 dies spawn wave 12
when wave 12 dies spawn wave 13
when wave 13 dies spawn wave 1


As long as it's a continuous script, it should keep checking for wave 1 to die until it respawns and is killed. I've never actually done a wave based map before but in theory this should work.(I'm just waiting for one of the site's more seasoned members to correct everything I just said)
Edited by rerout343 on Dec 16, 2010 at 05:05 AM


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 16, 2010 05:15 AM    Msg. 4 of 6       
Quote: --- Original message by: rerout343

Do what every one else said just make sure your script is told to respawn wave 1. I know these aren't the exact commands but if you already have your 13 waves setup you should already know them.

script continuous name
spawn wave 1
when wave 1 dies spawn wave 2
when wave 2 dies spawn wave 3
when wave 3 dies spawn wave 4
when wave 4 dies spawn wave 5
when wave 5 dies spawn wave 6
when wave 6 dies spawn wave 7
when wave 7 dies spawn wave 8
when wave 8 dies spawn wave 9
when wave 9 dies spawn wave 10
when wave 10 dies spawn wave 11
when wave 11 dies spawn wave 12
when wave 12 dies spawn wave 13
when wave 13 dies spawn wave 1


As long as it's a continuous script, it should keep checking for wave 1 to die until it respawns and is killed. I've never actually done a wave based map before but in theory this should work.(I'm just waiting for one of the site's more seasoned members to correct everything I just said)
Edited by rerout343 on Dec 16, 2010 at 05:05 AM


A better way to do this is:

(global boolean next_round false)
(global short round_number 0)

(script static void waves_part2
(-SPAWN WAVE 6-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 6 IS DEAD-)
(-SPAWN WAVE 7-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 7 IS DEAD-)
(-SPAWN WAVE 8-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 8 IS DEAD-)
(-SPAWN WAVE 9-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 9 IS DEAD-)
(-SPAWN WAVE 10-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 10 IS DEAD-)
(set next_round true)
)

(script static void waves_part1
(-SPAWN WAVE 1-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 1 IS DEAD-)
(-SPAWN WAVE 2-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 2 IS DEAD-)
(-SPAWN WAVE 3-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 3 IS DEAD-)
(-SPAWN WAVE 4-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 4 IS DEAD-)
(-SPAWN WAVE 5-)
(-COMMANDS-)
(-SLEEP UNTIL WAVE 5 IS DEAD-)
(waves_part2)
)

(script startup ilikepie
(-COMMANDS-)
(waves_part1)
)

(script continuous roundchecker
(if (= next_round true)
(begin
(set next_round false)
(set round_number (+ round_number 1))
(waves_part1)
)
)
(sleep 45)
)


I use a similar system in my map, but I didn't have access to the original at the moment, so I just wrote this. Hope it gives you a good idea.
Edited by MoooseGuy on Dec 16, 2010 at 05:23 AM
Edited by MoooseGuy on Dec 16, 2010 at 05:24 AM


Xoronatus
Joined: Dec 6, 2010

Taking a break


Posted: Dec 18, 2010 02:31 AM    Msg. 5 of 6       
Yeah, it worked. Now my map is almost finished.


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 18, 2010 06:08 AM    Msg. 6 of 6       
You're welcome.

 

 
Previous Older Thread    Next newer Thread







Time: Sat January 21, 2023 1:28 AM 375 ms.
A Halo Maps Website