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
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.
You want JASS text and so, you want to learn Handlers. Yes, that is possible. Look here: http://www.wc3sear.ch/viewtopic.php?t=10544 . I think this guy mentioned something about handlers and Kattana answered. If you are still having problems, I will give you the sintax of knockback.
hehe, glad I could be of help (however minuscule it may be) 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