- Joined
- Oct 4, 2011
- Messages
- 226
I have used this before to keep track of certain projectile units and such. I am making an AoE over time ability and need to track the summoned dummy unit. So I am trying to save the "AA01_IdInteger" Integer variable as the created unit and then saving it as the temp unit in the loop trigger. But the real value of 4.00 is never saved or is not properly loaded so the values arn't loaded.
-
Shadow bind
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Ability 1 (Maybe Black Wizard)
-
Actions
- Set AA01_TargetLoc = (Target point of ability being cast)
- Unit - Create 1 Peasant for (Owner of (Triggering unit)) at AA01_TargetLoc facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_AA01_TargetLoc)
- Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
- Unit Group - Add (Last created unit) to AA01_LoopGroup
- Set AA01_TempUnit = (Last created unit)
- Custom script: set udg_AA01_IdInteger = GetHandleId(udg_AA01_TempUnit)
- Hashtable - Save 4.00 as 1 of AA01_IdInteger in AA01_Hash
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Shadow bind loop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on Shadow bind loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
Shadow bind loop
-
Events
- Time - Every 0.02 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in AA01_LoopGroup) Greater than 0
-
Then - Actions
-
Unit Group - Pick every unit in AA01_LoopGroup and do (Actions)
-
Loop - Actions
- Set AA01_LoopTempUnit = (Picked unit)
- Custom script: set udg_AA01_IdInteger = GetHandleId(udg_AA01_LoopTempUnit)
- Set AA01_TempReal = (Load 1 of AA01_IdInteger from AA01_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AA01_TempReal Greater than 0.00
-
Then - Actions
- Hashtable - Save (AA01_TempReal - 0.02) as 1 of AA01_IdInteger in AA01_Hash
-
Else - Actions
- Hashtable - Clear all child hashtables of child AA01_IdInteger in AA01_Hash
- Unit Group - Remove AA01_LoopTempUnit from AA01_LoopGroup
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in AA01_LoopGroup and do (Actions)
-
Else - Actions
- Trigger - Turn off (This trigger)
- Game - Display to (All players) for 0.50 seconds the text: |cff22ccffLOOP OFF|...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events