Jump to content
Sign in to follow this  
zordak

Abandoned vehicles respawn, how to?

Recommended Posts

hi, im editing a mission and want make the heli and boats respawn if it were abandoned, how i can do that?

thanks.

Share this post


Link to post
Share on other sites

use a getOut event handler on the vehicle.

---------- Post added at 02:56 PM ---------- Previous post was at 02:56 PM ----------

_vehi addEventHandler["getOut",{<code>}];

Share this post


Link to post
Share on other sites

How exactly i do that? i trying to do it but i cant find the way.

Some help will be appreciated :)

Share this post


Link to post
Share on other sites

Abandoned Vehicle Respawn script

Here's another old script from ArmA that may be of use to you: http://norrin.org/downloads/ArmA2/VRS/vrs_test.utes.rar

Description

It respawns vehicles either after they have been destroyed or they have been abandoned for a set amount of time. I've also done a quick test in ArmA2 and it seems to working fine (see test mission in rar file).

To implement

1. Copy the VRS.sqf file into your mission directory

2. In the init line of the vehicie you want to respawn place the following code:

nul = [this,  120, 45] execVM "VRS.sqf";

where the first number (120) is the amount of time that the vehicle can be abandoned before it respawns; and

the second number (45) is the amount of time before the vehicle respawns after it has been destroyed.

The vehicle respawns at the point where it was placed in the mission editor.

Note if you get back into the vehicle before the abandoned timer elapses it will reset

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  

×