HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Array questions...

07-12-2003, 05:54 PM#1
Ultramagnetic
Okay lets say I have a unit array variable.


unit[5] in one trigger equals the target unit of issued order.


unit[6] in another trigger equals the same.


If I target the SAME unit with two different orders from two diferent triggers that use these variables one after the other will the unit jump from one index to the other, leaving the first one blank?
07-12-2003, 11:39 PM#2
Hivemind
Not exactly sure what your asking. But we will try to answer as best we can.

Being in two slots of a array is the same thing as being two totaly different variables. Being in a array just allows your to control how they are used. Each trigger works independantly as well. So an effect from one trigger wont change how another trigger works unless you link them somehow. Being the target of a order would not create a link between triggers.

Think of it like this. The same unit can be in several groups and effect several different triggers at the same time. This is the same with a variable. Being a array or not has no effect on this.

Hope that helps. If not try going into more detail with your question.
07-13-2003, 04:22 AM#3
Ultramagnetic
What I'm asking is if I have a unit array variable, with the index set in two different triggers to two diferent numbers each variable set to the value 'targeted unit of issued order', with two different orders like say storm bolt, and frostnova, and I target the same unit with both different spells one after the other will the unit still be held in both indexes of the variable at the same time... Each one should set the unit to 'target unit of issued order. So will one knock the other out?

Basicly what I wanna know is can 1 unit occupy 2 different indexes on the same unit variable array, and be the 'target unit of issued order' for both at the same time?
07-13-2003, 10:55 AM#4
Dead-Inside
Okay, now, an array is just multiple variables with the same name. So to explain this the "baby way",

Variables UnitFux and UnitSux are variables reffering to units. AKA, Unit variables.

Now, we have unit F000.
So, F000 steps in to a region and triggers a trigger by doing so.
In the action part of that trigger, we have:
Set UnitFux = F000
Set UnitSux = F000

Now we bring in another unit in to the game, called F001
F001 steps in to the same region, and for whatever reason we set one variable to the new unit.
If UnitFux = F000 then do Set UnitSux = F001 else do nothing

Now we can reffer to both units. Before this, both Fux and Sux reffered to F000, now, you have set F001 to Sux.

Now we can use both units in other triggers, before we used the same.

Regards
Dead-Inside