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

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,338
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