• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

One Variable for multiple actions

Status
Not open for further replies.
Level 2
Joined
Jun 26, 2012
Messages
7
As the title sais, i was wondering, if one variable could be used with multiple spells, as I always see people talking about "TempX" X=Location/Group/Position or anything like that.

So, for example, i have two heroes, both with a shockwavelike spell, lets call them Fire and Water. And I want to create special effects at the target location.
So instead of tracking the target areas in "Firelocation" and "Waterlocation", I intendet to save both them in "Templocation" and remove them afterwards.
But what will happen if both heroes cast the spell at the same time?
Since this is very unlikely to happen, I just want to get sure, that I have no messed up triggering in my map.

Thanks
Triar
 
The short answer is that Wc3 doesnt run different triggers at the same time and it doesnt swap between the execution of different triggers wich are executed even by the same event.

So if you have 2 triggers reacting to the same event, first one gets executed and when that is done the second one starts. Note that this is different if a trigger uses a Wait (TriggerSleepAction), while one trigger is sleeping Wc3 can start the execution of another trigger.
 
Interesting, thanks, muzzel. Just one more question: when 2 triggers react on the same event, which one gets executed first? Is it the one which is closer to the cap of the Trigger Editor?
 
This is way more tricky.

Basically with the same event, the trigger which has been created the first in the trigger editor will fire the first, no matter where it's placed in the trigger editor.
Now, if you close the editor, reopen the map, the relative order of triggers will be considered when you will save the map again, this thing can be used for a map "protection", but it's really easy to get rid of it once you understand it.
It's just something lame.

Btw even if the sc2 editor is much more powerfull i hate it because of the poor galaxy support, but i know that the trigger relative order always does matter on save, as it should.
 
Troll-Brain, interesting. But I do not think it may actually matter in a well-written script. If there are two triggers the order of which is important, it is much safer just to combine then into one complex trigger and add if...then...else to choose which part (or both) to run every time.
 
Status
Not open for further replies.
Back
Top