- Joined
- Nov 2, 2007
- Messages
- 160
Hey guys
I want to use Hastables to store the target of it's movement order.
The hashtable is created and stored in a variable in the Initialisation.
This is the trigger that stores the target when the unit gets it's orders:
Dinah
I want to use Hastables to store the target of it's movement order.
The hashtable is created and stored in a variable in the Initialisation.
This is the trigger that stores the target when the unit gets it's orders:
-
1. Trigger
-
Ereignisse
- Einheit - A unit enters MyRegion <gen>
-
Bedingungen
- (Owner of (Triggering unit)) Gleich Spieler 12 (Braun)
-
Aktionen
- Set Mylocation = (Center of MyRegion <gen>)
- Einheit - Order (Triggering unit) to Move to Mylocation
- Hashtabelle - Clear all child hashtables of child (Key (Triggering unit)) in Myhashtable
- Hashtabelle - Save (X of Mylocation) as 0 of (Key (Triggering unit)) in Myhashtable
- Hashtabelle - Save (Y of Mylocation) as 1 of (Key (Triggering unit)) in Myhashtable
- Custom script: call RemoveLocation (udg_Mylocation)
-
Ereignisse
-
2. Trigger
-
Ereignisse
- Spieler - Spieler 1 (Rot) select a unit
-
Bedingungen
- (Owner of (Triggering unit)) Gleich Spieler 12 (Braun)
-
Aktionen
- Set Mylocation= (Point((Load 0 of (Key (Triggering unit)) from Myhashtable), (Load 1 of (Key (Triggering unit)) from Myhashtable)))
- Einheit - Order (Triggering unit) to Move to Mylocation
- Custom script: call RemoveLocation(udg_Mylocation)
-
Ereignisse
Dinah