• 🏆 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!

[Trigger] Need help with timer/timerwindow using a unit variable as a condition

Status
Not open for further replies.
Level 4
Joined
Jan 23, 2009
Messages
74
i want to make a timerwindow and timer that begins/is created when all players have chosen a hero from the tavern(s)

  • Game Timer
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • HeroCount Equal to (Number of players in (All players controlled by a User player))
    • Actions
      • Countdown Timer - Create a timer window for (Last started timer) with title GameTimer
      • Countdown Timer - Start GameTimer as a One-shot timer that will expire in 240.00 seconds
  • HeroWest
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Tavern 0000 <gen>
    • Actions
      • Set HeroCount = (HeroCount + 1)
      • Unit - Remove (Buying unit) from the game
      • Unit - Move (Sold unit) instantly to (Center of West spawn <gen>)
      • Camera - Pan camera for (Owner of (Sold unit)) to (Center of West spawn <gen>) over 2.00 seconds
  • HeroEast
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Tavern 0002 <gen>
    • Actions
      • Set HeroCount = (HeroCount + 1)
      • Unit - Remove (Buying unit) from the game
      • Unit - Move (Sold unit) instantly to (Center of East Spawn <gen>)
      • Camera - Pan camera for (Owner of (Buying unit)) to (Center of East Spawn <gen>) over 2.00 seconds
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
you create the window for (last started timer) BEFORE starting the timer. see the error here?

You also need to initialize GameTimer
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Hey,

alot of things to say, but comming directly to your question:

1st: remove "Unit - A unit Sells a unit" from the Game Timer trigger
2nd: add "Trigger - Run Trigger Game Timer <gen> (checking conditions)" at the end of the other two triggers
3rd: see post above

Id also destroy all 3 triggers after that timer runs
 
Status
Not open for further replies.
Top