Home   Help Search Login Register  

Author Topic: dead driver  (Read 557 times)

0 Members and 4 Guests are viewing this topic.

skid

  • Guest
dead driver
« on: 11 Oct 2003, 22:59:16 »
I have a truck which I need to keep moving even if the driver is killed I need another passenger to take his place.
That works if they are grouped but I need them to be ungrouped.
The problem is they won't get in if the driver is still in the driver seat, I tried unassign vehicle but they still won't kick him out. If I jump in the driver seat then get out another unit will then get in so my script seems to be ok.
Also if the driver is killed while going to the vehicle another will take his place so that's ok.

Does anyone know how to kick the dead guy out?.

GrimMonkey

  • Guest
Re:dead driver
« Reply #1 on: 11 Oct 2003, 23:39:52 »
I'm not so good with scripting :P,

First, use a script that checks if the driver is dead: ! (not alive) whatever

Then, write something like UnitName MoveInDriver VehicleName; UnitName being the driver-to-be and VehicleName is (duh) the name of the vehicle.

OR

Using the the script to check if the driver is dead; you can delete him and do what needs to be done.

I hope that helps. This is something I just picked off the top of my head ;).


Beware the GrimMonkey

skid

  • Guest
Re:dead driver
« Reply #2 on: 12 Oct 2003, 00:15:31 »
Well I tried movinDriver Vehicle and it worked but as it is instant unlike the assignasdriver it spoils the effect somewhat.
However it did give me an Idea when the driver is dead I used movindriver but moved in a game logic that kicks out the dead driver and allows my other unit to take over.

I still think a neater way must exist.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:dead driver
« Reply #3 on: 13 Oct 2003, 03:41:08 »
Instead of moveindriver, try:

unit assignasdriver vehicle
[ unit ] ordergetin true

And see if he does what he's told then ;)

m21man

  • Guest
Re:dead driver
« Reply #4 on: 13 Oct 2003, 03:57:53 »
When the driver is killed, have the script generate an array of all the living passengers. Select the first guy in the array, have him get out of the truck (Eject him or force him to disembark), then have him board the truck as its driver.