working on electrify fances.. i have it working... my unique issue is i need only electrify the fence around a plot area.
but with my way i was electrify all fences in the map... its cuz im. using the objet name to recognize the fence.. but i dont know another way... if anyone can helpme .. heres the script.
i execute it trouht a hpp button.
init_electrify.sqf
Spoiler
msg = false;
electrify = false;
while {true} do {
private ["_pos","_allconditions","_inRange","_fence"];
Question
juandayz
well after 3 days i decided ask for help :)
working on electrify fances.. i have it working... my unique issue is i need only electrify the fence around a plot area.
but with my way i was electrify all fences in the map... its cuz im. using the objet name to recognize the fence.. but i dont know another way... if anyone can helpme .. heres the script.
i execute it trouht a hpp button.
init_electrify.sqf
msg = false;
electrify = false;
while {true} do {
private ["_pos","_allconditions","_inRange","_fence"];
_fence = ["MAP_plot_green_draty"];//the fence ID
_pos = getPosATL player;
_allconditions = (nearestObjects [_pos, _fence, 2]);
_inRange = count _allconditions > 0;
if (_inRange) then {
if (!msg) then {
cutText ['Electrified fences warning', 'PLAIN'];
msg = true;
[] execVM 'custom\scripts\workshop\sqfs\electrify.sqf'; //heres where i call the action to electrify
};
} else {
r_player_unconscious = false;
electrify = false;
msg = false;
};
};
electrify.sqf
electrify = true;
while {electrify} do {
titleText ["you was electrified!!!", "PLAIN DOWN"];titleFadeOut 5;
r_player_unconscious = true;
};
Link to comment
Share on other sites
2 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