Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Ah yeah you have a good point, vehicles will explode is the engine part is at 0.9 or above, so i guess that when the engine explodes the husks damage is still set to what it used to be, or atleast very close to 1.0...
Perhaps adding it so that if ( _dmg >= 0.9 ) instead of > 1.0 would be better.
if (isServer) then {
_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8458.8281, 1089.4734, -1.1444092e-005], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setDir -9.4094629;
_this setPos [8458.8281, 1089.4734, -1.1444092e-005];
};
_vehicle_2 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8463.1719, 1090.2358, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
_vehicle_2 = _this;
_this setDir -9.4094629;
_this setPos [8463.1719, 1090.2358, 4.5776367e-005];
};
_vehicle_4 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_4 = _this;
_this setDir -9.4094629;
_this setPos [8467.2373, 1090.8937, 3.0517578e-005];
};
_vehicle_6 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8471.4307, 1091.6425, 1.1444092e-005], [], 0, "CAN_COLLIDE"];
_vehicle_6 = _this;
_this setDir -9.4094629;
_this setPos [8471.4307, 1091.6425, 1.1444092e-005];
};
_vehicle_8 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8475.6064, 1092.3893, 7.6293945e-006], [], 0, "CAN_COLLIDE"];
_vehicle_8 = _this;
_this setDir -9.4094629;
_this setPos [8475.6064, 1092.3893, 7.6293945e-006];
};
_vehicle_10 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8479.5146, 1092.7472], [], 0, "CAN_COLLIDE"];
_vehicle_10 = _this;
_this setDir -9.4094629;
_this setPos [8479.5146, 1092.7472];
};
_vehicle_12 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8483.4336, 1092.9009, 7.6293945e-006], [], 0, "CAN_COLLIDE"];
_vehicle_12 = _this;
_this setDir -9.4094629;
_this setPos [8483.4336, 1092.9009, 7.6293945e-006];
};
_vehicle_14 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8487.1934, 1093.0371, -7.6293945e-006], [], 0, "CAN_COLLIDE"];
_vehicle_14 = _this;
_this setDir -9.4094629;
_this setPos [8487.1934, 1093.0371, -7.6293945e-006];
};
_vehicle_16 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8491.2969, 1092.98, -2.6702881e-005], [], 0, "CAN_COLLIDE"];
_vehicle_16 = _this;
_this setDir -9.4094629;
_this setPos [8491.2969, 1092.98, -2.6702881e-005];
};
_vehicle_18 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8495.6953, 1093.3019, -2.2888184e-005], [], 0, "CAN_COLLIDE"];
_vehicle_18 = _this;
_this setDir -9.4094629;
_this setPos [8495.6953, 1093.3019, -2.2888184e-005];
};
_vehicle_20 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8499.9365, 1093.6034, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_20 = _this;
_this setDir -9.4094629;
_this setPos [8499.9365, 1093.6034, 1.5258789e-005];
};
_vehicle_22 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8504.0117, 1094.0244, -5.7220459e-005], [], 0, "CAN_COLLIDE"];
_vehicle_22 = _this;
_this setDir -9.4094629;
_this setPos [8504.0117, 1094.0244, -5.7220459e-005];
};
_vehicle_24 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8508.0518, 1094.7218, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_24 = _this;
_this setDir -9.4094629;
_this setPos [8508.0518, 1094.7218, 1.5258789e-005];
};
_vehicle_26 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8512.2412, 1095.2993, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
_vehicle_26 = _this;
_this setDir -9.4094629;
_this setPos [8512.2412, 1095.2993, -3.8146973e-006];
};
_vehicle_28 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8516.4258, 1096.0171, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_28 = _this;
_this setDir -9.4094629;
_this setPos [8516.4258, 1096.0171, 1.5258789e-005];
};
_vehicle_30 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8520.5596, 1096.7286, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
_vehicle_30 = _this;
_this setDir -9.4094629;
_this setPos [8520.5596, 1096.7286, -3.8146973e-006];
};
_vehicle_32 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8524.7061, 1097.5837, -2.2888184e-005], [], 0, "CAN_COLLIDE"];
_vehicle_32 = _this;
_this setDir -9.4094629;
_this setPos [8524.7061, 1097.5837, -2.2888184e-005];
};
_vehicle_34 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8528.7813, 1098.2867, 1.1444092e-005], [], 0, "CAN_COLLIDE"];
_vehicle_34 = _this;
_this setDir -9.4094629;
_this setPos [8528.7813, 1098.2867, 1.1444092e-005];
};
_vehicle_36 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8532.6719, 1098.9656, -1.9073486e-005], [], 0, "CAN_COLLIDE"];
_vehicle_36 = _this;
_this setDir -9.4094629;
_this setPos [8532.6719, 1098.9656, -1.9073486e-005];
};
_vehicle_38 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8536.3027, 1099.897, -3.8146973e-006], [], 0, "CAN_COLLIDE"];
_vehicle_38 = _this;
_this setDir -14.391428;
_this setPos [8536.3027, 1099.897, -3.8146973e-006];
};
};
[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };
_vehicle_4 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_4 = _this;
_this setDir -9.4094629;
_this setPos [8467.2373, 1090.8937, 3.0517578e-005];
_this setVehicleInit "[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };";
};
processInitCommands;
You might be able to put a setVehicleInit with something like this:
Code:[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };
This would go inside of your vehicles that you spawn, like:
Code:_vehicle_4 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_4 = _this; _this setDir -9.4094629; _this setPos [8467.2373, 1090.8937, 3.0517578e-005]; _this setVehicleInit "[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };"; }; processInitCommands;
The above is totally untested, just fyi![]()
Doing corpses is not as simple as doing the vehicles, as the corpses are cleaned up anyways with the server fsm file.great thanks now how do you do corpses with a delay![]()
_object_damage = {
private["_hitpoints","_array","_hit","_selection","_key","_damage"];
_hitpoints = _object call vehicle_getHitpoints;
_damage = damage _object;
_array = [];
{
_hit = [_object,_x] call object_getHit;
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
_object setHit ["_selection", _hit]
} forEach _hitpoints;
_key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
_object setVariable ["needUpdate",false,true];
if ( !(alive _object) ) then { _object spawn { sleep 5; deleteVehicle _this; }; };
};
You might be able to put a setVehicleInit with something like this:
Code:[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };
This would go inside of your vehicles that you spawn, like:
Code:_vehicle_4 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_4 = _this; _this setDir -9.4094629; _this setPos [8467.2373, 1090.8937, 3.0517578e-005]; _this setVehicleInit "[] spawn { waitUntil { !(alive _this) }; sleep 5; deleteVehicle _this; };"; }; processInitCommands;
The above is totally untested, just fyi![]()
Any script errors in the client's RPT?
And yeah, this would be testable in the editor.
[] spawn { while {true} do { hintSilent ( format [ 'Vehicle\n%1\n\nAlive\n%2', _this, alive _this ] ); sleep 1; }; };
_this setVehicleInit "[] spawn { waitUntil { ((getDamage _this) == 1) }; sleep 5; deleteVehicle _this; };";
I don't believe that vehicles have an alive table, so !(alive _this) I don't believe will work. You need to use something like this instead.
Code:_this setVehicleInit "[] spawn { waitUntil { ((getDamage _this) == 1) }; sleep 5; deleteVehicle _this; };";
I think I may have the syntax wrong though. getDammage returns the vehicle damage from 0-1. 1 would be destroyed.
Arma be stupid lol.
Thanks for clearing that up Vampire.
_this setVehicleInit "[] spawn { waitUntil { ((getDamage _this) == 1) }; sleep 5; deleteVehicle _this; };";[/FONT]
_isBuilding
if (!_parachuteWest and !(locked _object)) then {
if (_objectID == "0" && _uid == "0") then
{
_object_position = getPosATL _object;
_isNotOk = true;
};
};
_isBuilding = (typeOf _object == "Building")
if (((getDammage _object) == 1) && !_isbuildable && !_isBuilding) then {
deleteVehicle _object;
};
_isBuilding = (typeOf _object == "Building")
if (((getDammage _object) == 1) && !_isBuilding) then {
deleteVehicle _object;
};
_this setVariable ["myCars",1,true];
if (((getDammage _object) == 1) && (_object getVariable [""myCars"",0] == 1)) then {
deleteVehicle _object;
};
Re-reading it I see you are trying to delete specifically damaged spawned vehicles.
In that case my last post modified after you add this to your vehicles:
Code:_this setVariable ["myCars",1,true];
_vehicle_4 = objNull;
if (true) then
{
_this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_4 = _this;
_this setDir -9.4094629;
_this setPos [8467.2373, 1090.8937, 3.0517578e-005];
_this setVariable ["myCars",1,true];
};
No you have to add it to these as an example:
Code:_vehicle_4 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [8467.2373, 1090.8937, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_4 = _this; _this setDir -9.4094629; _this setPos [8467.2373, 1090.8937, 3.0517578e-005]; _this setVariable ["myCars",1,true]; };
if (((getDammage _object) == 1) && (_object getVariable [""myCars"",0] == 1)) then {
deleteVehicle _object;
};
if (!_parachuteWest and !(locked _object)) then {
if (_objectID == "0" && _uid == "0") then
{
_object_position = getPosATL _object;
_isNotOk = true;
};
};