- Joined
- Jan 25, 2011
- Messages
- 2,294
The title is meh.
The spell's purpose.
-First use: Store the target of the ability
-Second use: Move the stored unit to the target point of the ability
Triggers:
The problem is that it fails to get the stored point so the unit will move to the default location (mid map).
What am I missing?
The spell's purpose.
-First use: Store the target of the ability
-Second use: Move the stored unit to the target point of the ability
Triggers:
-
Allocate Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Allocate
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
uAllocate_Unit Not equal to No unit
-
-
Then - Actions
-
Hashtable - Save Handle Of(Target point of ability being cast) as 0 of iAllocateKey_Unit in hashAllocate
-
Unit Group - Add uAllocate_Unit to ugAllocate_Group
-
Trigger - Turn on Allocate Move <gen>
-
Set uAllocate_Unit = No unit
-
-
Else - Actions
-
Set uAllocate_Unit = (Target unit of ability being cast)
-
Set iAllocateKey_Unit = (Key (Target unit of ability being cast))
-
-
-
-
-
Allocate Move
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in ugAllocate_Group and do (Actions)
-
Loop - Actions
-
Set pTemp_Point_1 = (Position of (Picked unit))
-
Set pTemp_Point_2 = (pTemp_Point_1 offset by 30.00 towards (Angle from pTemp_Point_1 to (Load 0 of iAllocateKey_Unit in hashAllocate)) degrees)
-
Unit - Move (Picked unit) instantly to pTemp_Point_2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between pTemp_Point_2 and (Load 0 of iAllocateKey_Unit in hashAllocate)) Less than or equal to 31.00
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from ugAllocate_Group
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_pTemp_Point_1)
-
Custom script: call RemoveLocation (udg_pTemp_Point_2)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in ugAllocate_Group) Less than or equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
The problem is that it fails to get the stored point so the unit will move to the default location (mid map).
What am I missing?