• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Wave Ending Trigger

Status
Not open for further replies.
Level 9
Joined
Feb 5, 2008
Messages
398
:piru:Ok, im making a map similiar to a town/city defence and im missing a trigger and i dont know how to make it..in this map you have a team of defenders, and theirs wave of attackers, but i dont know how to make it so once one wave is sent and killed another comes like 30 seconds after..? anyone know how to do it and if its in JASS then no ty, i dont know what a JASS is, and wtf it mean, so plz if you know a wave trigger like that tell me !!! TY
 
Level 5
Joined
Sep 10, 2006
Messages
185
  • Next Level
    • Events
      • Player - Player 10 (Light Blue)'s Food used becomes Less than or equal to 0.00
    • Conditions
      • Defeat Equal to False
    • Actions
      • If (Level_Number Equal to 1) then do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 31.00 seconds) else do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 30.00 seconds)
      • Countdown Timer - Create a timer window for (Last started timer) with title ((Level + (String(Level_Number))) + in...)
      • -------- Set Next Level --------
      • If (Level_Number Equal to 1) then do (Wait 29.50 seconds) else do (Do nothing)
      • Game - Display to (All players) the text: |CFFFFFC00Next leve...
      • Trigger - Run Set Levels <gen> (checking conditions)
Something along those lines is what I think you're looking for. When the food becomes 0, the timer runs ect. Just an example.
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
Oh, true, there is a Player Property event for that, I forgot.
By the way, you forgot to start your timer in your trigger.

Edit: (Yes, Edit because there is an edit button) There is an edit button.
Don't doublepost, it's against the site rules and it's a punishable offense. Use the edit button.
 
Level 5
Joined
Sep 10, 2006
Messages
185
hmmm wait im confused on what to do with that...im not the best with triggers??

It's an example from my TD. When player 10's food becomes 0, (The waves that spawn) it starts up the timer, waits depending on the level (bosses ect -- time to build up), and then runs the spawn trigger.

Oh, true, there is a Player Property event for that, I forgot.
By the way, you forgot to start your timer in your trigger.

  • If (Level_Number Equal to 1) then do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 31.00 seconds) else do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 30.00 seconds)
??
 
Level 5
Joined
Sep 10, 2006
Messages
185
The Event: Food becomes Zero -- (all units are dead for player 10)

The Condition: Defeat = False -- (Defeat is a boolean variable, (true or false) defined a few seconds after map start up. I have a trigger checking if my variable, LIVES_LEFT is = to zero, and if it is, defeat = true.)

The action: I Start the timer, and wait for 30 seconds. After the 30 seconds, additional triggers are run to start the spawns.

When the units are spawned and killed, the trigger runs again.

It also helps to have an action like
  • Actions
  • set LEVEL_NUMBER = LEVEL NUMBER +1
And have level number tied to a certain type of spawn unit defined in another trigger. That way every time the trigger is run, different units spawn.
 
Level 5
Joined
Sep 10, 2006
Messages
185
errr....WTF?, i got everything until that variable,variables confuzzle me..

I run a trigger to set levels at the end of each wave. Level_Number is an integer variable, and it starts at 1.

  • Set Levels
    • Events
    • Conditions
      • Defeat Equal to False
    • Actions
      • -------- Level 1 --------
      • If (Level_Number Equal to 1) then do (Set Spawn_Unit = Peasant (#1)) else do (Do nothing)
      • If (Level_Number Equal to 1) then do (Set Spawn_Unit_Name = Peasants) else do (Do nothing)
I make the spawn trigger spawn units of unit type "Spawn_Unit".

This way, when Level_Number increases by one, this happens:

  • Set Levels
    • Events
    • Conditions
      • Defeat Equal to False
    • Actions
      • -------- Level 1 --------
      • If (Level_Number Equal to 1) then do (Set Spawn_Unit = Peasant (#1)) else do (Do nothing)
      • If (Level_Number Equal to 1) then do (Set Spawn_Unit_Name = Peasants) else do (Do nothing)
      • -------- Level 2 --------
      • If (Level_Number Equal to 2) then do (Set Spawn_Unit = Militia (#2)) else do (Do nothing)
      • If (Level_Number Equal to 2) then do (Set Spawn_Unit_Name = Militia) else do (Do nothing)
After the first wave, with "Set level _Number = Level_Number +1", Level_Number = 2. Therefore, when this trigger is run, Spawn_Unit changes to Militia, and militia are spawned by the spawn trigger instead of peasants.
 
Status
Not open for further replies.
Top