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

Are Timers MPI ?!

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Hi

I wonder if timers are MPI

For example, I have a spell that runs a timer , and another player uses the same spell and runs the same timer
There is a trigger that responses to Timer's expiring ... So to whose timer will the trigger work ? The first spell user? Or the second spell user ? Or every one has their spells working although they use the same timer?

Thanks in advance
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
It depends on how you manage the timers.

If you create a new timer variable everytime the trigger fires off, then you will not run into a problem.

However, if you have a global timer, then it will cause problems because it will interfere with any past states of that timer.

Could you post your code so we can see what is going on?
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
For example, I have a spell that runs a timer , and another player uses the same spell and runs the same timer
There is a trigger that responses to Timer's expiring ... So to whose timer will the trigger work ? The first spell user? Or the second spell user ? Or every one has their spells working although they use the same timer?
Only the last cast will count, the previous casts will malfunction.
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Use the player number to access the array index
It isn't possible, nor that easy 0_O, how ? I feel ignorant in timers really
Put all the events in one trigger then. There should be a distinguisher for which timer expired, or at least what index the timer has. I don't know myself since I never used arrayed timers.
It's like chobibo's idea and which I thought too, but How do I make the trigger response to each timer's array ?
Generally how can I make the trigger response to an event with array ?
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
  • Timer
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer TimerId) from 1 to 12, do (Trigger - Add to (Your trigger) the event (Time - Timer[TimerId] expires))
 
Status
Not open for further replies.
Top