Wave timer

810

New Member
Reaction score
1
Can someone provide an example of a repeating countdown timer that expires every minute or something and starts counting down again? i want to use a timer like this to say

Countdown timer expires: spawn # of units for player red and move them to center of <region>

i would also store info (integers) in a variable so that only 1 wave would come at a time instead of wave 1, wave 2, and wave 3 at the same time. (conditions)

also i want to make the timer show up at the top of the screen for all players.
 

hi_im_bob

......and you are?
Reaction score
44
Sounds like you are making a TD? Well even if your not look in the tutorial section for any TD tutorial all the information you are looking for is there.
 

810

New Member
Reaction score
1
Im making a gladiator map. I looked in the TD section and it explained how i can make units spawn, but i want to make a timer window that contains a timer so everyone can tell when the next wave is coming.
 
I

IKilledKEnny

Guest
There is a timer tutorial somwhere, go to advaced search and look there.
 
D

DemonOfNight

Guest
This is really easy to do...

i use 2 variables:

1 = gladiator timer (timer window)
2 = level (Integer)

This is the trigger u should use to make the timer window:

Code:
Timer Window

Event:
-map initialisation
Condition:
Action:
-create a timer window for (matching player(matching player slot status = to play) as repeated that will end in (time between each waves)(this is you, who decides it!)
-set galdiator timer = last created timer window
-show Last created timer window

This is for the waves:

Code:
Spawn

Event:
-Gladiator Timer expires
Condition:
Action:
-set level = level + 1
-wait 1 sec
if/then/else Multiple fonctions
If: 
-level = to 1
Then action:
-Create (number of units u want to create) at center of (your region) facing (degrees you want)
-Display to all players the text: Wave 1 (this one is optional)
-set level = level + 1
Else action;
-Do nothing

if/then/else Multiple fonctions
If: 
-level = to 2
Then action:
-Create (number of units u want to create) at center of (your region) facing (degrees you want)
-Display to all players the text: Wave 2 (this one is optional)
-set level = level + 1
Else action;
-Do nothing

[COLOR="Red"]Ans so on...[/COLOR]

Hope this helped you!!!:D
 
T

toast

Guest
Code:
Timer Window

Event:
-map initialisation
Condition:
Action:
-create a timer window for (matching player(matching player slot status = to play) as repeated that will end in (time between each waves)(this is you, who decides it!)
-set galdiator timer = last created timer window
-show Last created timer window

You can't show windows on initialization, do this trigger at .01 seconds into the game. Otherwise, it's fine.

Code:
Spawn

Event:
-Gladiator Timer expires
Condition:
Action:
-set level = level + 1
-wait 1 sec
if/then/else Multiple fonctions
If: 
-level = to 1
Then action:
-Create (number of units u want to create) at center of (your region) facing (degrees you want)
-Display to all players the text: Wave 1 (this one is optional)
-set level = level + 1
Else action;
-Do nothing

if/then/else Multiple fonctions
If: 
-level = to 2
Then action:
-Create (number of units u want to create) at center of (your region) facing (degrees you want)
-Display to all players the text: Wave 2 (this one is optional)
-set level = level + 1
Else action;
-Do nothing

[COLOR="Red"]Ans so on...[/COLOR]
You could do this a lot easier. Use level and a unit-type variable, and set each level to it's corresponding value in the array (i.e. unitTypeVar[1] would be your level one creeps).

Then do (this is freehand):

Code:
set level = level + 1
set tempPoint = center of <your region>
Create <number of units> unitTypeVar[level] at center of tempPoint facing <degrees>
custom script: call RemoveLocation(udg_tempPoint)

tempPoint is a point variable (there solely to remove the memory leak). Add whatever events and conditions are appropriate. Also: if you spawn a whole lot of units simultaneously, it can create lag spikes. Try to avoid it.
 
D

DemonOfNight

Guest
yes its true, i was doing another trigger on we so i got distracted!!!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top