• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] cast spell more than once?

Status
Not open for further replies.
Level 2
Joined
Jun 28, 2015
Messages
20
so this trigger is supposed to create a dummy, and then cast the "break morale" spell as many times as it can before disappearing. it works right now but it'll on cast the spell on a single unit and i cant figure out how to get it to work correctly.
  • Break Morale
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Break Morale (Dummy)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current lumber) Greater than or equal to 210
        • Then - Actions
          • Player - Set Player 1 (Red) Current lumber to ((Player 1 (Red) Current lumber) - 210)
          • Set BreakMoraleLocation = (Target point of ability being cast)
          • Set BreakMoraleGroup = (Units within 512.00 of BreakMoraleLocation)
          • Unit - Create 1 Magic Dummy for Player 1 (Red) at (BreakMoraleLocation offset by (0.00, 0.00)) facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Break Morale to (Last created unit)
          • Unit - Order (Last created unit) to Undead Banshee - Activate Curse
          • Unit Group - Pick every unit in BreakMoraleGroup and do (Actions)
            • Loop - Actions
              • Unit - Order (Last created unit) to Undead Banshee - Curse (Picked unit)
          • Custom script: call RemoveLocation (udg_BreakMoraleLocation)
          • Custom script: call DestroyGroup (udg_BreakMoraleGroup)
        • Else - Actions
can someone shed some light on this for me? ive been playing with this thing for like two hours now changing things around trying to get it to work correctly.

thanks in advance!
 
Level 5
Joined
Jan 17, 2014
Messages
131
Just to check, add a wait of 1 second after ordering the dummy to cast the spell. If it works properly then there is your problem. After that index it to make it MUI. If your spell is supposed to target all units at once, then base it off of a spell that already does that, like "Roar" or Howl of Terror".
 
Last edited:
Level 2
Joined
Jun 28, 2015
Messages
20
Just to check, add a wait of 1 second after ordering the dummy to cast the spell. If it works properly then there is your problem. After that index it to make it MUI. If your spell is supposed to target all units at once, then base it off of a spell that already does that, like "Roar" or Howl of Terror".

i tried adding a 1 second wait, but it still didn't work.
also, im not sure that'll work because i need the "curse" effect applied to all effected units.
 
Level 5
Joined
Jan 17, 2014
Messages
131
i tried adding a 1 second wait, but it still didn't work.
also, im not sure that'll work because i need the "curse" effect applied to all effected units.

Here, I made you a test map that needs some things to be work out, but I hope that you get the general idea.
 

Attachments

  • Test Map for The Count.w3x
    16.1 KB · Views: 33
Level 5
Joined
Jan 17, 2014
Messages
131
Updated Ivofena's map and added my own version to it.
It does what Maker said and it casts curse instantly to all units in the area.

That's cool, but I was actually trying to make it cast on the units 1 by 1. If only @The_Count was more specific in his explanation. Right now, I think he wants a mass spell like yours to be cast every 0.10 seconds to all targets in range for 5 seconds or until the dummy dies (if the dummy is killed before the 5 seconds expire. Yes, I think he wants the dummy to be visible, targetable and killable). And that's not hard to make. :p
 
Level 2
Joined
Jun 28, 2015
Messages
20
thanks for taking your time to make both the test maps, i really do appreciate it. turns out what i wanted was more complicated than i thought. ill try to incorporate what i learned from them.

EDIT: ivofena was right, i wanted the Dummy To Be Target-able, killable and to apply curse to units 1 by 1. sorry for being unclear with my explanation.
 
Last edited:
Level 5
Joined
Jan 17, 2014
Messages
131
thanks for taking your time to make the test maps, i really do appreciate it. turns out what i wanted was more complicated than i thought. ill try to incorporate what i learned from them.

Would you care to explain exactly what it is you want and maybe then we can truly help you.

Edit: Something like this perhaps?
 

Attachments

  • Test Map for The Count.w3x
    14.8 KB · Views: 160
Last edited:
Level 2
Joined
Jun 28, 2015
Messages
20
Would you care to explain exactly what it is you want and maybe then we can truly help you.

Edit: Something like this perhaps?

yes, thank you.

Summons an immovable ward that curses the sh*t out of nearby units.
^this caught me by surprise and made me giggle like a teenage girl.

EDIT: Have Everything working The Way i hoped, thank you everyone for the help and suggestions.
 
Last edited:
Level 25
Joined
May 11, 2007
Messages
4,651
That's cool, but I was actually trying to make it cast on the units 1 by 1. If only @The_Count was more specific in his explanation. Right now, I think he wants a mass spell like yours to be cast every 0.10 seconds to all targets in range for 5 seconds or until the dummy dies (if the dummy is killed before the 5 seconds expire. Yes, I think he wants the dummy to be visible, targetable and killable). And that's not hard to make. :p

Well if that's all he wanted, he could just add summon a ward with a duration of 5 seconds, with the curse ability and a cooldown of 0.10 seconds.
No need for triggering at all. :p

But your trigger did give me an idea for a spell. And it was neat.
 
Level 5
Joined
Jan 17, 2014
Messages
131
Well if that's all he wanted, he could just add summon a ward with a duration of 5 seconds, with the curse ability and a cooldown of 0.10 seconds.
No need for triggering at all. :p

But your trigger did give me an idea for a spell. And it was neat.

I'm glad I can help. :)
 
Status
Not open for further replies.
Top