- Joined
- May 2, 2008
- Messages
- 44
I'm trying to do an expansive spell that stuns an pull the enemies away, but i don't know how to do a triger to push ONLY enemies when used, can someone tell me how?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Set tmp_Group = Units within 500.00 of (Triggering Unit) matching Owner of (Matching Unit) is an enemy of Owner of (Triggering Unit)
Unit Group - Pick all units in tmp_Group and do actions

Loop - Actions


-------- Knockback Stuff --------
lulzguess next time i will write some shit and hope for the best -.-
or [TRIGGER] you see at the beginning of thread names BTW.
Events

Unit - A unit Begins channeling an ability
Conditions

(Ability being cast) Equal to Push Back
Actions

Set Casting_Unit = (Casting unit)

Trigger - Turn on Push back <gen>

Special Effect - Create a special effect attached to the origin of Casting_Unit using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl

Wait 0.10 seconds

Special Effect - Create a special effect attached to the origin of Casting_Unit using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl

Unit Group - Pick every unit in (Units within 350.00 of (Position of Casting_Unit) matching ((matching Owner of (Matching Unit) is an enemy of Owner of (Casting_Unit)))) and do (Actions)


Loop - Actions



Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl

Wait 0.30 seconds

Unit Group - Pick every unit in (Units within 360.00 of (Position of (Casting unit)) matching ((matching Owner of (Matching Unit) is an enemy of Owner of (Casting_Unit)) and do (Actions)


Loop - Actions



Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Real((Strength of (Casting unit) (Include bonuses)))) x 2.00) damage of attack type Chaos and damage type Force

Trigger - Turn off Push back <gen>
Events

Time - Every 0.01 seconds of game time
Conditions
Actions

Unit Group - Pick every unit in (Units within 350.00 of (Position of Casting_Unit) matching ((Owner of (Matching Unit) is an enemy of Owner of (Casting_Unit))) and do (Actions)


Loop - Actions



Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 5.00 towards (180.00 + (Angle from (Position of (Picked unit)) to (Position of Casting_Unit))) degrees)
There are several leaks and you shouldn't use 0.01 seconds, you should use more like 0.04 or 0.03.
