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

[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