Here's a trigger I'm using as part of a spell, but I'm not sure if the variables TempAngle and TempAngle2 are leaking.
Any help would be great, thanks
Trigger:
- MoI Active
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Master of Illusion
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Target unit of ability being cast) is in IllusionistIllusions) Equal to True
- Then - Actions
- Set TempPoint = (Position of (Target unit of ability being cast))
- Set TempPoint2 = (Position of (Casting unit))
- Set TempAngle = (Facing of (Triggering unit))
- Set TempAngle2 = (Facing of (Target unit of ability being cast))
- Unit - Move (Target unit of ability being cast) instantly to TempPoint2, facing TempAngle degrees
- Unit - Move (Triggering unit) instantly to TempPoint, facing TempAngle2 degrees
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Else - Actions
- Unit - Order (Triggering unit) to Stop
- Set TempPlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
- Game - Display to TempPlayerGroup the text: This spell can only...
- Custom script: call DestroyForce(udg_TempPlayerGroup)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Any help would be great, thanks