Well, I have this trigger that should transfer a certain unit along with its corresponding handle in the hashtable but it doesnt do so : it doesnt work after transferred the first time but when I transfer it back it works normaly. My only guess is the unit in the hashtable isnt being transfererd at all.
-
DropOffBuild
-

Events
-


Unit - A unit Finishes construction
-
-

Conditions
-


Or - Any (Conditions) are true
-



Conditions
-




(Owner of (Triggering unit)) Equal to Player 1 (Red)
-




(Owner of (Triggering unit)) Equal to Player 6 (Orange)
-
-
-


Or - Any (Conditions) are true
-



Conditions
-




(Unit-type of (Triggering unit)) Equal to Great Hall
-




(Unit-type of (Triggering unit)) Equal to War Mill
-
-
-
-

Actions
-


Set TempPoint = (Position of (Triggering unit))
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Unit-type of (Triggering unit)) Equal to Great Hall
-
-



Then - Actions
-




Unit - Create 1 Dummy [Lumber & Gold] for Neutral Passive at TempPoint facing Default building facing degrees
-
-



Else - Actions
-




Unit - Create 1 Dummy [Lumber] for Neutral Passive at TempPoint facing Default building facing degrees
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
-



Then - Actions
-




Unit - Change ownership of (Last created unit) to Player 6 (Orange) and Change color
-
-



Else - Actions
-




Unit - Change ownership of (Last created unit) to Player 1 (Red) and Change color
-
-
-


Set x = (X of TempPoint)
-


Set y = (Y of TempPoint)
-


Unit - Turn collision for (Last created unit) Off
-


Custom script: call SetUnitX(GetLastCreatedUnit(), udg_x)
-


Custom script: call SetUnitY(GetLastCreatedUnit(), udg_y)
-


Set TempUGroup = (Units in (Playable map area) matching ((Matching unit) Equal to (Triggering unit)))
-


Unit Group - Pick every unit in TempUGroup and do (Actions)
-



Loop - Actions
-




Hashtable - Save Handle Of(Last created unit) as 0 of (Key (Picked unit)) in (Last created hashtable)
-
-
-


Custom script: call DestroyGroup (udg_TempUGroup)
-


Custom script: call RemoveLocation (udg_TempPoint)
-


Unit Group - Add (Triggering unit) to ResourceDropBuildings
-
-
-
Then - Actions
-

Selection - Remove (Picked unit) from selection for Player1
-

Cinematic - Ping minimap for (All players) at (Position of (Picked unit)) for 3.00 seconds
-

Set ExchangeSuccess = True
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



((Picked unit) is in ResourceDropBuildings) Equal to True
-
-


Then - Actions
-



Unit - Change ownership of (Load 0 of (Key (Picked unit)) in RecDropOffHastable) to Player2 and Change color
-



Set TempUnit = (Load 0 of (Key (Picked unit)) in RecDropOffHastable)
-



Set TempPoint = (Position of (Picked unit))
-



Set x = (X of TempPoint)
-



Set y = (Y of TempPoint)
-



Custom script: call SetUnitX(udg_TempUnit, udg_x)
-



Custom script: call SetUnitY(udg_TempUnit, udg_y)
-
-


Else - Actions
-
-

Unit - Change ownership of (Picked unit) to Player2 and Change color
-

Unit Group - Remove (Picked unit) from TempUGroup
-

Unit Group - Remove (Picked unit) from ExchangeSelection1
-

Unit Group - Remove (Picked unit) from ExchangeSelection2
-











