Discussion in 'World Editor Help' started by death_knight, Feb 5, 2011.

1. ### death_knightDark is the heart of a corrupted man.

Ratings:
+24 / 0 / -0
Hey guys,

I have the following trigger:

Code:
```Fuel Runs Out
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of PlayerCar[1]) Equal to Player 1 (Red)
(Integer((Mana of PlayerCar[1]))) Equal to 0
CarOwned[1] Equal to True
Then - Actions
Unit - Order PlayerCar[1] to Unload PlayerUnit[1]
Unit - Order PlayerCar[1] to Stop
Unit - Change ownership of PlayerCar[1] to Neutral Passive and Retain color
Set FuelConsumption[1] = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(South Western Car Park <gen> contains PlayerCar[1]) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
SWCPCarParkNumber[1] Less than or equal to 6
Then - Actions
Unit - Move PlayerCar[1] instantly to (Center of PlayerCarParkSWCP[1]), facing 90.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
SWCPCarParkNumber[1] Greater than or equal to 7
Then - Actions
Unit - Move PlayerCar[1] instantly to (Center of PlayerCarParkSWCP[1]), facing 270.00 degrees
Else - Actions
Else - Actions
Game - Display to Player Group - Player 1 (Red) the text: You're car has run ...
Set FuelRunOut[1] = True
Else - Actions
```
Whats basically happening is that the trigger is checking three things:
1. Whether or not the player is the owner of the vehicle
2. If the player actually bought the car (CarOwned = True)
3. And If the Fuel (mana) is equal to zero

My problem is that the car doesn't unload the player's unit before the ownership of the car is changed back to Neutral Passive, even though I have the action "Unit - Order PlayerCar[1] to Unload PlayerUnit[1]".

Any ideas?

2. ### NecrachYou can change this now in User CP.

Ratings:
+62 / 0 / -0
You order it to stop 0 time after issuing the unload order... Maybe add a short, short Wait action between the unload order and the Stop, or simply remove the "Unit - Order PlayerCar[1] to Stop"?

• Like x 1
3. ### death_knightDark is the heart of a corrupted man.

Ratings:
+24 / 0 / -0
I didn't put 2 and 2 together and realise that. Thanks very much. I just added a short wait after the unload action.

4. ### GFreak45I didnt slap you, i high 5'd your face.

Ratings:
+132 / 0 / -0
just a thought here, take it or leave it, what if u added a trigger to make the mana drain faster per unit in the vehicle, like set it to drain 1/sec with 1 unit, 2 with 2 units, etc

5. ### JACO PASTOR EDITORMember

Ratings:
+0 / 0 / -0
How to make trigger mechanical units not being able to move unless it has loaded a unit...?
Anyone tell me..
Thank you