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

Multistance Period Trigger

Status
Not open for further replies.
Level 2
Joined
Apr 8, 2005
Messages
13
I'm having problems with multistance skill that pushback. My spell is called Powerbash and i want it to stun + pushback. I know about local variables and stuff like this, but i cant see how to do a "local trigger" with periodic event (every 0.3 sec) that works multistance. I have tried seeing alot of vexorian's spells (i learnt jass seeing his spells) but i couldnt figure how he do local periodic triggers.
I have also tried to download alot of pushback spells too, but i coulnt find no one multistance x.x
Can someone help me? :3
 
Level 3
Joined
Aug 21, 2004
Messages
57
Two integer variables and a few arrays should do it. Make a dummy unit with a passive 100% custom Bash, and an attack cooldown of 0.30 seconds.

Trigger 1

Events
Unit - A unit Starts the effect of an ability

Conditions
(Ability being cast) Equal to YourAbility

Actions
Set Interger_1 = 1
For each (Integer Integer_1) from (1 to 10), do (Actions)
-> Loop - Actions
--> If (All Conditions are True) then do (Then Actions) else do (Else Actions)
---> If - Conditions
----> (Target_Unit_array[Integer_1] is alive) Equal to False
---> Then - Actions
----> Set Target_Unit_array[Integer_1] = (Target unit of ability being cast)
----> Set Target_Unit_facing_angle_array[Integer_1] = (Facing of (Target unit of ability being cast))
----> Create 1 DummyUnit for Triggering player at (Position of (Target unit of ability being cast))
----> Set Dummy_Basher[Integer_1] = Last created unit

Trigger 2

Events
Time - Every 0.30 seconds of game time

Conditions
-Empty-

Actions
Set Integer_2 = 1
For each (Integer Integer_2) from (1 to 10), do (Actions)
-> Loop - Actions
--> Unit - Move Target_Unit-array[Integer_2] instantly to ((Position of Target_Unit_array[Integer_2] offset by 50.00 towards (Target_Unit_facing_angle_array[Integer_2] + 180.00) degrees), facing Target_Unit_facing_angle_array[Integer_2] degrees
--> Unit - Move Dummy_Basher[Integer_2] instantly to ((Position of Target_Unit_array[Integer_2]
--> Order Dummy_Basher[Integer_2] to Attack Target_Unit_array[Integer_2]

Notes:
The 1 to 10 limits how many instances you can have in one map at any given time. If you need more, just change 10 to a bigger number. I know this isn't a 100% multi-instanceable method, but for limited conditions it works well enough for me.
 
Level 2
Joined
Apr 8, 2005
Messages
13
azure; ty for the help, u gave me some ideas =p

daelin; ye i kno u need handle variables to create a periodic local trigger but i couldnt figure how to do it ._.
 
Level 3
Joined
Aug 21, 2004
Messages
57
hehe, glad I could be of help (however minuscule it may be) :p
I used the kind of trigger I posted above there for a Red Lightning Hose spell I made (not posted), and it works fine, but I'm afraid my method will lag if one requires lots of multi-instance.... and I don't know JASS; can't use it even if my life depended on it... meh... I might get bored during the summer though and stare at Vex's spells and try to learn JASS XD
 
Status
Not open for further replies.
Top