second_coming Posted April 27, 2015 Report Share Posted April 27, 2015 I am working on a script that I only want people to be able to activate if they are in range of a jammer which belongs to them or their group leader. Does anyone know how to check for that? Link to comment Share on other sites More sharing options...
0 Buliwyf Posted April 27, 2015 Report Share Posted April 27, 2015 { if ( (_x getVariable ["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID] ) then {player groupChat format ["Distance to jammer: %1m", player distance _x];} else {player groupChat "No jammer in range!";}; } forEach nearestObjects [player, ["PlotPole_EPOCH"], 150]; Untested code.. but i hope i made no big mistakes.. :) The code checks all jammers in range of 150 meters and if there is one which ownes you or your group it gives you the range. But i have no idea if some of the scripting commands are blocked by Epoch, Battleye or something like that. js2k6 1 Link to comment Share on other sites More sharing options...
0 second_coming Posted April 27, 2015 Author Report Share Posted April 27, 2015 worked a treat, cheers :) Link to comment Share on other sites More sharing options...
0 horbin Posted April 27, 2015 Report Share Posted April 27, 2015 sweet. I can do some stuff with this :) Link to comment Share on other sites More sharing options...
0 js2k6 Posted April 28, 2015 Report Share Posted April 28, 2015 ahhh perfect, { if ( (_x getVariable ["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID] ) then {player groupChat format ["Distance to jammer: %1m", player distance _x];} else {player groupChat "No jammer in range!";}; } forEach nearestObjects [player, ["PlotPole_EPOCH"], 150]; Untested code.. but i hope i made no big mistakes.. :) The code checks all jammers in range of 150 meters and if there is one which ownes you or your group it gives you the range. But i have no idea if some of the scripting commands are blocked by Epoch, Battleye or something like that. excellent, thanks for sharing. currently have a couple of scripts that could utilise this first script is passive energy gain from proximity to frequency jammers and the second is an exitwith condition for igiload, to stop people from glitching through walls with go karts. it'd be better if players could still load/unload near their own base, and better still if you only gained energy from your own jammer. second_coming 1 Link to comment Share on other sites More sharing options...
Question
second_coming
I am working on a script that I only want people to be able to activate if they are in range of a jammer which belongs to them or their group leader.
Does anyone know how to check for that?
Link to comment
Share on other sites
4 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