HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need Help With Trigger to Attack

11-06-2008, 02:04 AM#1
wc3shady
For this trigger I'm trying to create, a unit casts the Attack ability. Now, I want to trigger it so it shows the unit's attack animation and deals 50 dmg to all units in front of the casting unit. So, this is my trigger that doesn't work:
Trigger:
Attacking
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Attack
Collapse Actions
Region - Center HeroAttack1 <gen> on ((Position of (Triggering unit)) offset by 256.00 towards Angle degrees)
Animation - Play (Triggering unit)'s attack animation
Unit Group - Pick every unit in (Units in HeroAttack1 <gen>) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 50.00))
Variables: Angle is the angle the casting unit is facing (this works)

So what happens when I do this is that purple blood spilling animation thing shows up, i heard a dying-rat like sound, and I keep hearing a sword slashing. But that's it.
11-06-2008, 09:21 AM#2
Fireeye
Where do you set the variable 'Angle'?
Furthermore you're leaking 1 location and 1 unit group.
11-06-2008, 07:53 PM#3
Zerzax
I haven't used GUI in a while, but I do know this: try using Damage Unit instead of set unit life, not only will it utilize the resistances of the target unit but the damaging player/unit (your caster) will receive credit for damage and kills using the spell.
11-14-2008, 03:56 AM#4
Pyrogasm
Regions: fail.
Groups: much better.

You should never use Regions for this sort of thing. A fixed version of your trigger would look something like this:
Trigger:
Attacking
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Attack
Collapse Actions
Set TempPoint = (Position of (Triggering Unit))
Set TempPoint2 = (TempPoint offset by 256.00 towards (Current Facing Angle of (Triggering Unit)) degrees)
Animation - Play (Triggering unit)'s attack animation
Custom script: set bj_wantDestroyGroup = true
Collapse Unit Group - Pick every unit in (Units within <Your Radius> of TempPoint2) and do (Actions))
Collapse Loop - Actions
Unit - Cause (Triggering Unit) to damage (Picked unit) for 50.00 damage of attack type normal and damage type universal)
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
11-14-2008, 06:55 AM#5
Kino
Wow.. I just made an entire map based on a simmilar ability.

You can have this map for refrence, its unprotected just incase you didnt know.
Attached Files
File type: w3xLabyrinth v.01.w3x (28.4 KB)