Jump to content
Sign in to follow this  
ricoadf

Making tanks respawn

Recommended Posts

G'day,

I know how to have humans respawn, I want to find out how to get tanks to respawn so that the players dont run out. Thanks

Share this post


Link to post
Share on other sites

Ah bugga, i saw MP and just went in and hit start new topic, could this be moved to Mission - User please inlove.gif

Share this post


Link to post
Share on other sites

Check this.

Not 100% sure, but i think there was some kind of VehicleRespawn script.

MfG Medicus

Share this post


Link to post
Share on other sites
Quote[/b] ]

if !(local server) exitWith{};

if (!isServer) exitWith {};

_vehicle = _this select 0;

_vehiclename = vehicleVarName _vehicle;

_dammage = getdammage _vehicle;

_startpos = getpos _vehicle;

_startdir = getdir _vehicle;

_type = typeof _vehicle;

_check = true;

_statusred = false;

_unbesetzt = false;

while {_check} do {

sleep 25;

if ((isnull driver _vehicle) && (isnull gunner _vehicle) && (isnull commander _vehicle)) then {

_unbesetzt = true;

} else {

_unbesetzt = false;

};

if ((!(canmove _vehicle) || (!(canFire _vehicle)) && ((_dammage) > 0.95))) then {

_statusred = true;

} else {

_statusred = false;

};

if ((_unbesetzt) && (_statusred)) then {

deletevehicle _vehicle;

sleep 400;

hint "new vehicle arrived!";

_vehicle2 = _type createvehicle _startpos;

_vehicle2 setVehicleVarName _vehiclename;

nil = [_vehicle2] execVM "rvehicle.sqf";

_check = false;

} else {

_check = true;

    };

sleep 25;

};

Copy text and save it as: respawn.sqf

Copy this script into your mission folders (

C:\Documents and Settings\switchstance\My Documents\ArmA ... you can found the mission here somewhere in a folder called YOURMISSIONNAME.xxx

.xxx stands for the island.. e.g. Sara, sara_dbe1 ...

)

Add to the tanks init: nil = [this] execVM "respawn.sqf";

with this script you can build a respawn for the tanks.. but the humans still respawn outside.

If you placed a respawn marker for the players, and you let the player start in a tank (make a tank playable..) you can just add a marker called:

"Respawn_vehicle_west" or "respawn_vehicle_east" whatever you need...

you find more informations here

http://community.bistudio.com/wiki/respawnVehicle

wink_o.gif

greetz

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  

×