• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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