Jump to content
Sign in to follow this  
miraoister

how can i stop peole ejecting?

Recommended Posts

Im trying to stop a VIP getting out of the car when the car shot at, he is meant to be escorted, but gets out of the car with is his 2 body guards and gets killed!

the third bodyguard/driver stays put.

I would like to know how I could script the VIP to stay in the car, and while driver to gets out of the car and engage the enemy.

also I would like the VIP to crouch down in his car seat if possible, (as if he is ducking down from bullets inside the vehicle) if anyone knows an animation sqs that could help i would appreiate it!

Share this post


Link to post
Share on other sites
Quote[/b] ]I would like to know how I could script the VIP to stay in the car, and while driver to gets out of the car and engage the enemy.

In the vechile addon in the config.cpp there will sometimes be a line or 2 declaring the eject paramaters. Here is a sample.

ejectDeadDriver = 0;

ejectDeadGunner = 0;

ejectDeadCargo = 1;

Not sure if you can work this into a script, but you may be able to include it in the initialization field. If not the only option is to modify the vehicle config.

.

Quote[/b] ]I would like to know how I could script the VIP to stay in the car, and while driver to gets out of the car and engage the enemy.

This should be easy to do using WayPoints. Place the driver and passanger on the map, but not as a group. For the driver in the initialization field put "this moveindriver car1". (car1  in name field of car) For passanger put "this moveincargo car1". Then make a Waypoint where you want the driver to go and select "GetOut" from the drop down menu for type of wayPoint. Then Place an "Empty" car on the map and name it car1.

By doing this both people will appear in car, the driver will drive to destination, stop and get out, while passager stays in vehicle.

Quote[/b] ]also I would like the VIP to crouch down in his car seat if possible, (as if he is ducking down from bullets inside the vehicle) if anyone knows an animation sqs that could help i would appreiate it!

Not possible. Well unless MAY BE you can do your own animation for it. If even possible would be very difficult.

Since you really seem to be interestested in scripting download this online command reference, it should be a big help.

Link

You should also try to "UnPBO" a mission file or 2 and open them in the editor to see how things are done.

Share this post


Link to post
Share on other sites
Quote[/b] ]Not sure if you can work this into a script, but you may be able to include it in the initialization field. If not the only option is to modify the vehicle config.

ejectdeaddriver etc... only specifies if a DEAD unit must be ejected from a vehicle or not. Nothing to do with cargos geting out ouf the vehicle when being fired at (which is unloadincombat = true in the cpp). It cannot be modified with a script.

Quote[/b] ]
Quote[/b] ]also I would like the VIP to crouch down in his car seat if possible, (as if he is ducking down from bullets inside the vehicle) if anyone knows an animation sqs that could help i would appreiate it!

Not possible. Well unless MAY BE you can do your own animation for it. If even possible would be very difficult

It is very possible and very easy to do something close.

Put a sport car with a driver on the map. Name it "car".

Put a first trigger activated by radio alpha, repeatable with the following code in the on activation line of the trigger :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">driver car switchmove "skodadriverdying"

Then put a second trigger activated by radio bravo, repeatable with the following code in the on activation line of the trigger :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">driver car switchmove "skodadriver"

Put yourself on the map and play wiith the radio commands (0-0-1 and 0-0-2) to see what happens to the car's driver.

The only problem will be to find a suitable animation for the VIP, here's a list of OFP moves list, check them depending on the vehicle you want to use. Of course the best solution would be to create your own anim.

Ofp wiki

Share this post


Link to post
Share on other sites

hello when the car is dammaged the AI automatic get out u can do a script to do this car armored smile_o.gif or u can disable ai move but am not try this in car

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×