OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 13 May 2004, 00:11:45
-
How do you make it so a person inside a vehicle does not get out, even if the vehicle is getting shot at or is damaged?
-
guy setdammage 1 ;D
(j/k)
I'm not quite sure atm as i weren't in the need for that yet,
but you could give it a try setting the guy's behaviour to
"CARELESS".
~S~ CD
-
Just lock the vehicle
vehicle lock true
this means that nobody can get in/out of the vehicle
-
Just lock the vehicle
vehicle lock true
this means that nobody can get in/out of the vehicle
Too bad that AI doesn't worry about wether the vehicle is
locked or not. ;)
~S~ CD
-
That was the first thing I tried when I read the post. As CD points out, LOCKing only applies to the player.
I can't find a solution to this one, after trying a couple different things.
-
I think there is a setting in the Config that ejects passangers if there under fire, but this is probably not what your after?
You can setup a script for the Getout event that forces the unit back into the vehicle, but this results in a flickering effect if you look to closely.
-
Unnamed: Ain't there a Get Out Eventhandler? Maybe do something like that?
An other idea is to setdammage the vehicle back to 0 all the time... Maybe something that you don't want to do though. :P
:beat: *Gets Shot* :beat:
-
"getin" and "getout" (to vehicles only) :
_this select 0 : the vehicle the EH is attached to ;
_this select 1 : in/from what position (driver, gunner, commander, cargo) ;
_this select 2 : who's just got in/out ;
The Getout event along with MoveInCargo and the position parameter e.t.c works ok regardless of damage, aslong as its viewed from a distance.
But as the config.cpp has the following defined by default for the LandVehicle class, they will bail even if there is no damage. So you would need the some what brutal method I described above.
unloadInCombat = true;
Although I dont think this applies to the driver. Unless as you say, the car is badly damaged and cant move.