sabot10.5mm 47 Posted May 21, 2016 i created a single player mission with respawning vehicles and a respawn for the player, but once the player dies he cant enter vehicles anymore... i figured since the Lock option is set to default maybe this is causing the problem? anyway to set the lock status on respawn for a spawned vehicle? Share this post Link to post Share on other sites
kylania 567 Posted May 22, 2016 You can use lock: _veh lock 0; Share this post Link to post Share on other sites
sabot10.5mm 47 Posted May 22, 2016 im fairly new to scripting, where should i put this? in the vehicle respawn module? specifically the expression field? Share this post Link to post Share on other sites
kylania 567 Posted May 22, 2016 I guess you're using the module from Modules (F5) -> Multiplayer -> Vehicle Respawn which is connected to your empty vehicle? You'd be correct in using the expression field for that. It would look like this: Probably want to turn off the explosion effect, so annoying. :) Share this post Link to post Share on other sites
sabot10.5mm 47 Posted May 22, 2016 i dont mind that.. thanks for your help;) Share this post Link to post Share on other sites
sabot10.5mm 47 Posted May 22, 2016 help me understand.. why doesnt a command like this work. _this allowdamage false; in the expression field Share this post Link to post Share on other sites
kylania 567 Posted May 22, 2016 If you hover over the words "Expression:" you'll see a little tool tip that explains more about that field. In this case it tells you that the passed arguments you have access to is an array of: [<new_vehicle>, <old_vehicle>] Which means that _this (the input array accessible to the commands in the expression field) contains an array with two elements, both objects, 0 being the new vehicle and 1 being the old. So while you'd use normally this in the init field of an object to refer to the object, in this case within the Expression field you'd need to use _this select 0 (the first element of the arguments array, _this) to refer to the new vehicle: (_this select 0) allowDamage false; Since _this select 0 would be the first element of the array and is the object of the newly respawned vehicle. Just the same as when we used _this select 0 lock 0; above to unlock the newly spawned vehicle. Share this post Link to post Share on other sites