• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Init Problems

Status
Not open for further replies.
Level 36
Joined
Mar 15, 2006
Messages
7,945
Okay in my TD, since i'm too lazy to make the triggers seperate, I have one trigger that starts the level timer at the start of the game, as well as dictates when to start the next level. Here it is:

  • Next Level
  • Events
  • Player - Player 11 (Dark Green)'s Food used becomes Less than or equal to 0.00
  • Player - Player 12 (Brown)'s Food used becomes Less than or equal to 0.00
  • Conditions
  • Defeat Equal to False
  • Actions
  • If (Level_Number Greater than 1) then do (Game - Display to Defenders the text: Congratulations, yo...) else do (Do nothing)
  • Set Gold_amount = (Gold_amount + 2)
  • Set Level_Number = (Level_Number + 1)
  • Leaderboard - Change the title of (Last created leaderboard) to (LotR TD + (Round + (String(Level_Number))))
  • If (Level_Number Equal to 1) then do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 60.00 seconds) else do (Countdown Timer - Start Next_Level as a One-shot timer that will expire in 30.00 seconds)
  • If (Level_Number Equal to 1) then do (Game - Display to (All players) the text: Welcome to Lord of ...) else do (Do nothing)
  • Countdown Timer - Create a timer window for (Last started timer) with title ((Level + (String(Level_Number))) + in...)
  • Game - Display to (All players) the text: |c0000cdf9Next leve...
  • If (Level_Number Equal to 33) then do (Game - Display to (All players) the text: Holy crap!!! You ma...) else do (Do nothing)
  • Trigger - Run Setspawns <gen> (checking conditions)
Problem is, at the start of the game, the trigger wont initialize unless I place down a unit owned by DG and have my tester guy kill it, then it initializes. So this leads me to believe that their food is not at 0 at the start of the game... which is not right because it should be... any suggestions?
 
Level 15
Joined
Nov 1, 2004
Messages
1,058
I think the "Food used becomes Less than or equal to" event only fires when a player's food usage changes.

Just add a Trigger - Run "Next Level" to your map initialization and that would probably solve the problem.
 
Status
Not open for further replies.
Top