• 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.

[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