Hello i was trying to help @lonewolfgaming with rubble town event..he wanna delete crates and markers once player loot the crate and not wait for the sleep _wait_time variable (900ssecnds)
I think put a check if nearest players and once player get the loot put a waituntil player distance from crate > 50 mts. to delete the crate and markers... else wait the sleep _wait_time variable and delete all.
heres is the code for it:
rubbletown.sqf
Spoiler
////Bunch of rubble town original code
// Send Top Right message to users , requires Remote message script
_hint = parseText format["<t align='center' color='#FF0000' shadow='2' size='1.75'>Rubble Town</t><br/><t align='center' color='#ffffff'>A special forces unit lost a precious cargo, Check your Map for the Location!</t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";
// Send center message to users
[nil,nil,rTitleText,"Mercenaries stashed a loot crate in rubble town]", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);
///////////////////////START THE CHANGES FOR DELETE CRATE AND MARKERS mission = 0;
Question
juandayz
Hello i was trying to help @lonewolfgaming with rubble town event..he wanna delete crates and markers once player loot the crate and not wait for the sleep _wait_time variable (900ssecnds)
I think put a check if nearest players and once player get the loot put a waituntil player distance from crate > 50 mts. to delete the crate and markers... else wait the sleep _wait_time variable and delete all.
heres is the code for it:
rubbletown.sqf
////Bunch of rubble town original code
// Send Top Right message to users , requires Remote message script
_hint = parseText format["<t align='center' color='#FF0000' shadow='2' size='1.75'>Rubble Town</t><br/><t align='center' color='#ffffff'>A special forces unit lost a precious cargo, Check your Map for the Location!</t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";
// Send center message to users
[nil,nil,rTitleText,"Mercenaries stashed a loot crate in rubble town]", "PLAIN",10] call RE;
diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);
///////////////////////START THE CHANGES FOR DELETE CRATE AND MARKERS
mission = 0;
/////////WAIT FOR NEAREST PLAYERS
{
if((isPlayer _x) && (_x distance _loot_box <= 3)) then {
mission = 1;
};
} count playableUnits;
if (mission !=0) then {
waitUntil{{isPlayer _x && _x distance _loot_box > 50 } count playableunits > 0};
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
// Send center message to users
[nil,nil,rTitleText,"End Mission rubble town]", "PLAIN",10] call RE;
}else{
// Wait
sleep _wait_time;
// Clean up
EPOCH_EVENT_RUNNING = false;
deleteVehicle _loot_box;
deleteMarker _event_marker;
if (_debug) then {
deleteMarker _debug_marker;
};
};
this not work.. maybe thers an error in syntax or something?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now