HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Choosing Trigger

08-20-2004, 06:27 PM#1
Progniss
Ok I came up with this idea for a one time trigger to choose heros that works for all players. Just Im having trouble making it work.

Code:
Heros
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Choose Hero 
    Actions
        Unit - Move (Targeted unit) instantly to (Center of Middle <gen>)
        Unit - Change ownership of (Targeted unit) to (Owner of (Attacking unit)) and Change color
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Middle <gen>) over 2.00 seconds
        Unit - Kill (Triggering unit)

The unit uses an ability just like Aerial Shackles (except it only works on heros, doesnt cost mana, and doesnt steal health over time). You take the hero chooser cast the ability on the hero you want, and the hero should change ownership to the player that cast the ability. Except the only things that are happening are the unit that casts the ability dies and the camera pans to the middle of the map.

Any ideas on how to fix this would be really appricaited, Thanks.
08-20-2004, 06:31 PM#2
rykao
Try changing 'targeted unit' to 'target unit of ability being cast' and 'attacking unit' to 'casting unit'
08-20-2004, 06:38 PM#3
Azhag
rykao is right, because in that trigger, it is look for a unit to attack, with either a melee attack or a ranged attack. In this case the unit is casting an ability, not attacking. It is simple things like this that mess with the trigger a lot.
08-20-2004, 06:41 PM#4
Progniss
Thanks :D it works now