• 🏆 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] Damage on custom-spell

Status
Not open for further replies.
Level 7
Joined
Dec 3, 2008
Messages
189
Hi all,
I (tried to) make a cusom spell called Mighty-Crush. In this spell first a slam appears on the position of the caster, then 4 slams around and then 4 on another positions around the caster. But now I want to damage each unit that is at the position of the slams (war-stomps). How can I do that with a good method?
On attached files you see the script.
Hope you can help me...
 

Attachments

  • MightySlam.jpg
    MightySlam.jpg
    124.1 KB · Views: 73
Level 24
Joined
Jun 16, 2008
Messages
1,939
u n this variables to make it leakless: loc1 group1

damage trigger

set loc1 = position of triggering unit
set group1 = every unit within bla range off loc1 matching matching unit is an enemy of triggering unit
pick every unit in group1 and do actions
loop-actions
damage unit for bla damage
custom script: call DestroyGroup(udg_group1)
custom script: call RemoveLocation(udg_loc1)


and use the action destroy last created special effect after each special effect creation
 
Level 7
Joined
Jul 20, 2008
Messages
377
To clarify what Palaslayer said:

"damage unit for bla damage" is done by Unit - Make Unit Damage Target. You just do that for all enemy units within range of the epicenter of the slam animation.

Unit - Make Unit Damage Area damages all units indiscriminately, so even if the caster himself is caught in the slam - he gets damaged. Hence, you pick all units within range of the epicenter that belongs to an enemy player of the owner of the caster. Get it?
 
Level 11
Joined
Nov 15, 2007
Messages
781
You could just have units casting war stomp/thunder clap/fan of knives. But if you're set on triggering the damage, you'll need to designate a separate area for each slam. How you do this all depends on if your spell is supposed to hit all the points at once, or if there's a delay between them, and if the spell needs to be able to be used by more than one unit at a time.
 
Status
Not open for further replies.
Top