Warcraft III resources & community, 2003–2006 · archived

Trigger Multi-Instancibility

4 posts
#1

Trigger Multi-Instancibility

Doing different things with the editor learned me something.
I'v found a way to create multi instancibility triggers, without JASS but with variables.
Maybe others don't know this way, so I'll give here how to create it.
(This is a little tutorial)
http://img427.imageshack.us/img427/327/file14om.jpg
When creating a Variable, ADD 10-12(Number of players) to it.
Now, when casting u maybe need to set the casting unit to a Variable. Use the following triggers to make it this time:
Set CastingUnit[(Player number of (Owner of (Casting unit)))] = (Casting unit)

http://img425.imageshack.us/img425/9563/file23vx.jpg
With this way, each unit will get he's own unique number when casting this, making it an multi instancibility number.
Next if u are going to create a spell:
http://img425.imageshack.us/img425/314/file39jq.jpg
Creating a point (just an example) where the hero is casting the ability. Also: MAKE ARRAY!
Now, the trigger for the point:
Set CastingPoint[(Player number of (Owner of CastingUnit[(Player number of (Triggering player))]))] = (Target point of ability being cast)

This is the casting point, so lets create a effect when casting Blizzard.
Special Effect - Create a special effect at CastingPoint[(Player number of (Owner of CastingUnit[(Player number of (Triggering player))]))] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

In this way it should to be work, Here it does!
A screenshot to prove :
http://img431.imageshack.us/img431/249/finalfile8ko.jpg
Here I got control of both Am's by using the sharing ability!
Well I hope I gave some good information, Have fun with it! ;)
#2
Might be the way some would choose to do it, but that limits you to 1 casting per player. If there can be multiple units it is easier to create a recycling system with a large variable array that has a count and recycles as a spell stops functioning or the trigger for that particular unit is no longer applicable. I have an example of this somewhere, it was used for a jump system that could handle a bunch of units jumping at once. Once I find it I will post it to demonstrate what I mean.
#3
We already knew this technique. It is pretty "classic" already and yeah, it's considered one of the best player MUI techniques in GUI. ;) And btw, array should be 12 elements long.

~Daelin
#4
Ye I said it ^^
When creating a Variable, ADD 10-12(Number of players) to it. 10,12,..
Damn, a tutorial for nothing :shock: ;P