• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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