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 »---HELP--- how to script spawning warthog when countdown timer = zero

Author Topic: ---HELP--- how to script spawning warthog when countdown timer = zero (3 messages, Page 1 of 1)
Moderators: Dennis

didymus
Joined: May 17, 2011


Posted: May 20, 2011 02:44 PM    Msg. 1 of 3       
Okay so my script is posted below. I am really confused why this isn't working.

(script continuous COUNTDOWN_ZERO
(begin
(if (and (numeric_countdown_timer_get 10) true)
(object_create mp_warthog ))
)
)








Okay so the *COUNTDOWN_ZERO* SCRIPT should execute as such


1. when countdown timer reaches 10 seconds
2. spawn warthog


**LATER on when my script is more developed I will make it to where certain team members (such as red team or blue team) can activate or deactivate the timers.


Problem: The warthog is automatically spawned at the beginning of the game.

--I MADE SURE that-- In Sapien that the banshee doesn't spawn under any game time.

The game is thinking that the warthog is spawned at beginning however it is supposed to be spawned when 10 seconds are left from countdown timer.




So what am I doing wrong?


rerout343
Joined: Aug 7, 2010

Targeted and Firing


Posted: May 20, 2011 05:23 PM    Msg. 2 of 3       
First of all, make sure that you set the warthog to: not placed automaticly in sapien

http://img845.imageshack.us/img845/7409/sapien.jpg


Quote: --- Original message by: didymus
(script continuous COUNTDOWN_ZERO
(begin
(if (and (numeric_countdown_timer_get 10) true)
(object_create mp_warthog ))
)
)


Also, you may want to change that line to:
(if (and (numeric_countdown_timer_get 0 10) true)

I've never used the command myself, so yours might be wright. I was just basing that on the syntax of the other commands involving the timer.


SlappyThePirate
Joined: Aug 24, 2009

You are irritating, I'll release nothing


Posted: May 20, 2011 05:25 PM    Msg. 3 of 3       
You might want to consider making your countdown timer a variable.

(global short TIMER 62)
That's a variable

(script continuous time_goes_on
(sleep 200)
(set TIMER (- TIMER 1)
)
That decreases the timer every second

(script startup hogspawn
(sleep_until (= TIMER 0)
(object_create mp_warthog)
)
That spawns the hog when 62 seconds pass

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 11:32 PM 94 ms.
A Halo Maps Website