Variable Help

Status
Not open for further replies.
Level 3
Joined
Nov 8, 2009
Messages
46
Let's say i got 2 triggers
  • Trigger 1
    • Events
  • A unit cast a spell
    • Conditions
  • Spell equal to storm bolt
    • Actions
  • Set Caster = casting unit
  • Create 1 ghoul
  • Trigger 2
    • Events
  • A unit cast a spell
    • Conditions
  • Spell equal to blizzard
    • Actions
  • Set Caster = casting unit
  • Create 1 Footman
The point is can i use the same Variable Caster for all the triggers for my spells.

If 1 player cast storm bolt and another play cast blizzard at the same time, will there be a bug?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
just a notice, in your trigger the casting unit = triggering unit, what is (with triggerplayer) the only thing what dont changed until trigger end, allways same indifferent how much time running that trigger.

so my advice, if u need only the caster unit then dont store to variable and use triggering unit :)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
And as you might know this, Warcraft III uses a single-thread mechanism, that will never runs a trigger at the same time.
It will finish either on of them first before proceed to another trigger.

Therefore, it will not bug as long the spell/trigger has instant effect.
 
Status
Not open for further replies.
Top