• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Timer with Array problem

Status
Not open for further replies.
Level 2
Joined
Sep 1, 2011
Messages
12
  • Ultra Defense
    • Ereignisse
      • Unit - A unit starts the effect of an ability
    • Bedingungen
      • (Ability being cast) Gleich Ultra Defense ()
    • Aktionen
      • Set Temp_Unit[i] = (Triggering unit)
      • Set i = (Player number of (Triggering player))
      • Unit - Add Ultra Defense to Temp_Unit[i]
      • Countdown-Timer - Start UltraDefense[i] as a One-shot timer that will expire in 4.00 seconds
Thats ok so far (I hope at least) i'll fix the leaks later, just want this to work first. The problem comes now with the red part.


  • Ultra Defense Ends
    • Ereignisse
      • Timer - UltraDefense[(Number of players)] expires
    • Bedingungen
    • Aktionen
      • Einheit - Remove Ultra Defense from Temp_Unit[i]
Timer - UltraDefense[(Number of players)] expires
How do I refer to the right timer? I cant choose my variable "i". What kind of variable do I need?



GoDlikeWarrior
 
Level 2
Joined
Sep 1, 2011
Messages
12
Yeah thank you. After some thinking I came up with the idea to just use a periodic trigger to count down. And it seems to work.

I dont know why I was so obsessed with timer oO.
 
Status
Not open for further replies.
Top