• 🏆 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!

[Trigger] Multiple missile on single target

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
How do i make a spell that will fires 3 missile on target? i use storm bolt as my spell and create 3 dummy unit who will cast acid bomb on target. but the problem is..it only fires 1 missile not 3 and it seems impossible to make this work for unit with same spells. how do i solve this with trigger?
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Show the triggers

Edit: Hmmm, also if you literally create a 3 units in one function it will only return one unit which is the last created. You should manually create one unit only to refer it properly then use loops or repeat the line procedure based on the amount you desire. ( I prefer loops )
 
Last edited:
Level 6
Joined
Jan 2, 2015
Messages
171
  • Chain Rocket Sound 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Rocket
    • Actions
      • Sound - Play soundArray[55] at 100.00% volume, attached to (Casting unit)
      • Sound - Set cutoff distance of (Last played sound) to 1000.00
      • Unit - Create 1 Dumy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Add Chain Rocket Dummy to (Triggering unit)
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of issued order)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Dumy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Add Chain Rocket Dummy to (Triggering unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of issued order)
my chain rocket spell base on acid bomb and i want 2 dummy unit to use dummy rocket but does not working
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Make sure the dummy unit is configured well having 0 cast time related and the ability have 0 cooldown, manacost and 999999 range.

Edit: you must add the ability to the last created unit not to the triggering unit.

Edit2:

* Change casting unit into triggering unit
* Change target unit issued order into target unit of ability being cast
* Change owner of casting unit into owner of triggering unit too as I've said.
* Apply expiration timers first before adding and ordering dummies.
* Store them into a variables
* You are leaking the position of caster. Store that location and remove it.
 
Last edited:
Level 6
Joined
Jan 2, 2015
Messages
171
i got it work on firing 3 missile now. but the problem is i want the unit to play Spell Animation when unit casting the spell but it seems not working.

  • Chain Rocket Sound 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Rocket dummy 3
    • Actions
      • Set gunner = (Casting unit)
      • Sound - Play soundArray[55] at 100.00% volume, attached to (Casting unit)
      • Sound - Set cutoff distance of (Last played sound) to 1000.00
      • Unit - Create 1 Dumy Chain for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of ability being cast)
      • Animation - Play gunner's spell,1 animation
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • For each (Integer chainsegment) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dumy Chain 2 for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
          • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of ability being cast)
          • Animation - Play gunner's spell,2 animation
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Edit:

I want the unit play animation 3 times and theres time gap between firing missile which i achieve it already except this animation. it only play once then it stay idle when 2 dummies casting the spell. So my unit also have spell based on acid spell, same as dumy spells
 
Last edited:
Level 20
Joined
Aug 13, 2013
Messages
1,696
Just go to the object data ( F6 ) of the casted ability and you may find 'Art - Animation Names' then put the animation string you want inside it.

And also it will literally not work because the animation you currently input is not valid, just put "spell" and remove the ",1,2" inside the parameter. Also you only need to play the animation once so you must remove the animation action inside the loop.
 
Level 6
Joined
Jan 2, 2015
Messages
171
Just go to the object data ( F6 ) of the casted ability and you may find 'Art - Animation Names' then put the animation string you want inside it.

And also it will literally not work because the animation you currently input is not valid, just put "spell" and remove the ",1,2" inside the parameter. Also you only need to play the animation once so you must remove the animation action inside the loop.

i tried what did u told me. but the animation only play once and that animation is from Spells Animation Art. but it does not play animation when unit casting spells
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Uh, I didnt notice your edited post

If you need a time gap between animations then Im sure you need a periodic timer. Or In case you dont want periodic timers then you can use waits and variable shadowing for MUI.
( but waits are limited to 0.3 something )

Edit: MUI Triggers with Waits

The caster will only play the animation once because you played it at the same time which only follows the last animation action.

Also you need to reset it's animation to default/normal in the end of the animation after playing some animations.
 
Last edited:
Status
Not open for further replies.
Top