This trigger doesn't work at the moment. If I remove the local variable declarations it does. Why?
Code:
Psychokenesis
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Psychokenesis
Actions
Custom script: local unit udg_castunit
Custom script: local unit udg_spelltarget
Custom script: local unit udg_dummyunit
Custom script: local location udg_spellpoint
Set castunit = (Casting unit)
Set spelltarget = (Target unit of ability being cast)
Set spellpoint = (Position of spelltarget)
Game - Display to (All players) the text: (Name of castunit)
Game - Display to (All players) the text: (Name of spelltarget)
Unit - Add Storm Crow Form Edit to spelltarget
Unit - Pause spelltarget
Unit - Remove Crow Form from spelltarget
Wait 0.30 game-time seconds
Animation - Change spelltarget flying height to ((Default flying height of spelltarget) + 500.00) at 1000.00
Wait 0.50 game-time seconds
Animation - Change spelltarget flying height to (Default flying height of spelltarget) at 1000.00
Wait 0.25 game-time seconds
Unit - Unpause spelltarget
Unit - Create 1 dummy for (Owner of castunit) at spellpoint facing Default building facing degrees
Set dummyunit = (Last created unit)
Unit - Add Telekinesis Stun to dummyunit
Unit - Set Level of Telekinesis Stun for dummyunit to (Level of Psychokenesis for castunit)
Unit - Order dummyunit to Orc Tauren Chieftain - War Stomp
Unit - Add a 1.00 second Generic expiration timer to dummyunit
Custom script: call RemoveLocation( udg_spellpoint )