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

Trigger Multi-Instancibility

Status
Not open for further replies.
Level 8
Joined
Feb 12, 2005
Messages
200
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)
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:
Code:
Set CastingUnit[(Player number of (Owner of (Casting unit)))] = (Casting unit)
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:
file39jq.jpg

Creating a point (just an example) where the hero is casting the ability. Also: MAKE ARRAY!
Now, the trigger for the point:
Code:
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.
Code:
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 :
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! ;)
 
Level 7
Joined
May 16, 2004
Messages
355
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.
 
Status
Not open for further replies.
Top