- Joined
- Jun 10, 2008
- Messages
- 1,399
i get that error ingame when these triggers run, any help?
Help would be appreatiated.
-
ReturnLoop
-
Events
- Timer - Every 0.3 seconds of Game Time
- Local Variables
- Conditions
-
Actions
-
Unit Group - Pick each unit in ReturningPlanes and do (Actions)
-
Actions
- Unit - Order (Picked unit) to ( Move (GetNearestCarrier((Picked unit)))) (Replace Existing Orders)
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
- (Distance between (Position of (Picked unit)) and (Position of (GetNearestCarrier((Picked unit))))) <= 0.5
-
Then
- Unit - Remove (Picked unit) from the game
- Unit Group - Remove (Picked unit) from ReturningPlanes
- Else
-
If
-
Actions
-
Unit Group - Pick each unit in ReturningPlanes and do (Actions)
-
Events
-
GetNearestCarrier
- Options: Function
- Return Type: Unit
-
Parameters
- Plane = No Unit <Unit>
- Grammar Text: GetNearestCarrier(Plane)
- Hint Text: (None)
- Custom Script Code
-
Local Variables
- NearestCarrier = No Unit <Unit>
- NearestCarriers = (Empty unit group) <Unit Group>
-
Actions
- Variable - Set NearestCarriers = (Carrier units in (Entire map) owned by player (Owner of Plane) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
- Variable - Set NearestCarrier = (Random Living unit from NearestCarriers)
-
Unit Group - Pick each unit in NearestCarriers and do (Actions)
-
Actions
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
- (Distance between (Position of Plane) and (Position of (Picked unit))) < (Distance between (Position of Plane) and (Position of NearestCarrier))
-
Then
- Variable - Set NearestCarrier = (Picked unit)
- Else
-
If
-
General - If (Conditions) then do (Actions) else do (Actions)
-
Actions
- General - Return NearestCarrier
Help would be appreatiated.