mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
Vehicle destroy action (forces respawn)
This commit is contained in:
parent
3df9024af2
commit
1f6860e0f9
9
helotraining_mp.Altis/destroyVehicleAction.sqf
Normal file
9
helotraining_mp.Altis/destroyVehicleAction.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
private _vehicle = _this select 0;
|
||||
private _caller = _this select 1;
|
||||
private _returnValue = [];
|
||||
|
||||
_vehicle setDamage 1;
|
||||
sleep 1;
|
||||
_vehicle setDamage 0;
|
||||
|
||||
_returnValue
|
@ -18,6 +18,7 @@ selectLZ = compileFinal preProcessfile "selectLZ.sqf";
|
||||
getAlivePlayers = compileFinal preProcessfile "getAlivePlayers.sqf";
|
||||
spawnCrewAction = compileFinal preProcessfile "spawnCrewAction.sqf";
|
||||
spawnPlayerTask = compileFinal preProcessfile "spawnPlayerTask.sqf";
|
||||
destroyVehicleAction = compileFinal preProcessfile "destroyVehicleAction.sqf";
|
||||
|
||||
taskSpawner = compileFinal preProcessfile "taskSpawner.sqf";
|
||||
xenoRepair = compileFinal preProcessfile "xenoRepair.sqf";
|
||||
|
@ -1,7 +1,9 @@
|
||||
//diag_log format["vehicleIinit called, _this: %1", _this];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_vehicle setDamage 0;
|
||||
|
||||
_vehicle remoteExec ["removeAllActions", 0, "rmall" + (_vehicle call BIS_fnc_netId)];
|
||||
[_vehicle, ["Repair", { [_this select 0] spawn xenoRepair; }]] remoteExec ["addAction", 0, "addrepair" + (_vehicle call BIS_fnc_netId)];
|
||||
[_vehicle, ["Spawn crew", { _this spawn spawnCrewAction; }]] remoteExec ["addAction", 0, "addcrew" + (_vehicle call BIS_fnc_netId)];
|
||||
[_vehicle, ["Respawn vehicle", { _this spawn destroyVehicleAction; }]] remoteExec ["addAction", 0, "destroy" + (_vehicle call BIS_fnc_netId)];
|
||||
|
Loading…
Reference in New Issue
Block a user