Ignite Tent

daambi

Member
Hi, does anyone have the script or know how to ignite tents that then delete from the database and if this is at all possible? I have seen other servers have this feature but with a quick search I am unable to find anything. Any help would be great

Thanks
 
Breaking point stole it from 2017,

Code:
//#Vehicle Ignite Tent - Based from rocket/community tent_pitch.sqf and tent_pack.sqf
 
private["_entity"];
_entity = _this select 3; //_entity = tent passed from another script
 
//Removes the action ( Stops using the same action 2x)
player removeAction s_player_igniteTent;
s_player_igniteTent = -1;
 
player playActionNow "Medic"; // TODO: Better Animations??
sleep 4; // Animation wait time
 
//Gets the Tent's ID/UID
_tentID    = _entity getVariable["ObjectID","0"];
_tentUID    = _entity getVariable["ObjectUID","0"];
 
dayzFire = [_entity,5,time,false,true];
publicVariable "dayzFire";
_id = dayzFire spawn BIS_Effects_Burn;
 
_entity setDamage 1;
 
//Creates a public var to delete the tent
dayzDeleteObj = [_tentID,_tentUID];
publicVariableServer "dayzDeleteObj";
 
Create an SQF called tent_ignite.sqf and place the above code into it.

Then add this to fn_selfactions, some where near pack tent will do.

Code:
    //Allow player to set tent on fire
    if(_isTent and _hasMatches and _canDo and !_isMan) then {
        if (s_player_igniteTent < 0) then {
            s_player_igniteTent = player addAction [format["Ignite Tent"], "\yourcustomscriptfolder\tent_ignite.sqf",cursorTarget, 1, true, true, "", ""];
        };
    } else {
        player removeAction s_player_igniteTent;
        s_player_igniteTent = -1;
    };

Then to the bottom of the file add the following to all the actions

Code:
  player removeAction s_player_igniteTent;
  s_player_igniteTent = -1;

Obviously you will require an overwritten fn-self and complies, plenty of guides for that
 
Back
Top