OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gundernak on 02 Nov 2003, 13:57:05

Title: my goup members don't want to get in the vehicle?!
Post by: gundernak on 02 Nov 2003, 13:57:05
Hi all,

In my mission the player's group have to stop a vehicle and then get it the vehicle and drive somewhere.

After we occupied the vehicle and I command them to get in 'ride in back' and they are just trying to get in, and they simply can not. They climb to the vehicle and immediately fall out and say 'negative'.

I have tried a lot with tricking, but now I have no clue.

The vehicle lock is set to 'unlocked'.
I tried assignAsCargo command to the soldiers' init fields.
I tried it modelling in an empty scenario, and that case they CAN get it in...
And I have to mention I have met this situation in original BIS missions as well.

Can you give me a hint or something
 :-\
thanks in advance
Title: Re:my goup members don't want to get in the vehicle?!
Post by: deaddog on 02 Nov 2003, 14:08:14
I've seen the same problem and ended up doing a lot of testing, too.  I never came up with a perfect solution but I did notice some connection with the "dammage" level of the vehicle.  Getdammage would sometimes report something like 1.4017e-45 or similar.  When that happened, I could not order an AI unit to get in.

Add a "get in" eventhandler to the vehicle to report the damage level (thanks to Spinor at the CoC for this tip)

vehiclename addeventhandler ["get in", {hint format ["%1",getdammage (_this select 0)]}]

Might have to verify the syntax on that. :)
Title: Re:my goup members don't want to get in the vehicle?!
Post by: gundernak on 02 Nov 2003, 14:18:19
thanks,

As I mean this command will show the actual damage the vehicle suffered when they trying to get in?
Title: Re:my goup members don't want to get in the vehicle?!
Post by: deaddog on 02 Nov 2003, 14:43:55
That's right.

You could also put (_this select 0) setdammage 0 in the event handler, instead of the hint.  Maybe the AI will get in the vehicle but you might have to order them in twice.

Just a test, of course.
Title: Re:my goup members don't want to get in the vehicle?!
Post by: gundernak on 02 Nov 2003, 22:36:42
Yes, you are right.

It was because of the damage level of the vehicle...

funny

Luckily I have inserted a script to heal the vehicle for another cases, but it will work for this case as well :D

thanks