Skip to content

Commit

Permalink
Do not spawn if parent objects are hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed Jan 7, 2024
1 parent e8e3ddd commit af5cbba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/member_customization/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ call {
INFO("Spawning ""SK Bolec 17 kills graffiti and sign""");

private _pub = nearestObjects [[6898, 2560, 0], ["Land_A_Pub_01"], 25] param [0, objNull];
if (!alive _pub) exitWith {};
GVAR(bolec_17kills_graffiti) = QGVAR(graffiti_chernarus_bolec_17kills) createVehicleLocal [0,0,0];
if (!alive _pub || {isObjectHidden _pub}) exitWith {};
GVAR(bolec_17kills_graffiti) = createSimpleObject [QGVAR(graffiti_chernarus_bolec_17kills), [0,0,0], true];
GVAR(bolec_17kills_graffiti) setPosASL [6899.62,2569.36,7.35698];
GVAR(bolec_17kills_graffiti) setVectorDirAndUp [[0.040473,-0.999181,0], [0,0,1]];
_pub addEventHandler ["Killed", {
deleteVehicle (missionNamespace getVariable [QGVAR(bolec_17kills_graffiti), objNull]);
}];

private _sign = nearestObjects [[6898, 2569, 4], ["Land_SignB_Pub_CZ3"], 25] param [0, objNull];
if (!alive _sign) exitWith {};
if (!alive _sign || {isObjectHidden _sign}) exitWith {};
GVAR(bolec_17kills_banner) = createSimpleObject [QGVAR(banner_chernarus_bolec_17kills), [0,0,0], true];
GVAR(bolec_17kills_banner) setPosWorld [6898,2569.32,10.394];
GVAR(bolec_17kills_banner) setVectorDirAndUp [[0.0561846,-1.39887,-4.45146e-008], [-1.39887,-0.0561846,6.69994e-010]];
Expand Down

0 comments on commit af5cbba

Please sign in to comment.