Ctrl-Alt-Rage Posted May 19, 2015 Report Share Posted May 19, 2015 Is there a script available or possible to create that gives players the ability to build something in/around their base that can help generate energy instead of sitting in vehicles? Link to comment Share on other sites More sharing options...
0 second_coming Posted May 19, 2015 Report Share Posted May 19, 2015 I use this to give energy when in range of a friendly jammer:while {true} do { uiSleep 60; { if ( (_x getVariable ["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID] ) then { //In range of your own jammer boost energy gain if(EPOCH_playerEnergy < 2000) then { EPOCH_playerEnergy = EPOCH_playerEnergy + 50; systemchat("Jammer boosted energy: You have just received 50 Energy"); }; }; } forEach nearestObjects [player, ["PlotPole_EPOCH"], 225]; }; shurix 1 Link to comment Share on other sites More sharing options...
0 Ctrl-Alt-Rage Posted May 19, 2015 Author Report Share Posted May 19, 2015 Where do you place this code? And awesome thanks! Link to comment Share on other sites More sharing options...
0 second_coming Posted May 19, 2015 Report Share Posted May 19, 2015 Save the above code in your mission file as EnergyBoost.sqf and in your init.sqf put : if (!isDedicated and hasInterface) then { // EnergyBoost [] execVM "EnergyBoost.sqf"; systemchat("EnergyBoost activated..."); }; Just be careful if you adjust the max amount it gives you as if you try to make it go over 2500 energy infiSTAR will ban you (not sure about the stock AH). That's why I limited it to 2000 Link to comment Share on other sites More sharing options...
0 Sp4rkY Posted May 19, 2015 Report Share Posted May 19, 2015 why not trying something like this: while {true} do { uiSleep 60; { if ( (_x getVariable ["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID] ) then { //In range of your own jammer boost energy gain if((EPOCH_playerEnergy < 2000) && (!(EPOCH_playerEnergy >= 2450))) then { EPOCH_playerEnergy = EPOCH_playerEnergy + 50; systemchat("Jammer boosted energy: You have just received 50 Energy"); }; }; } forEach nearestObjects [player, ["PlotPole_EPOCH"], 225]; }; Link to comment Share on other sites More sharing options...
Question
Ctrl-Alt-Rage
Is there a script available or possible to create that gives players the ability to build something in/around their base that can help generate energy instead of sitting in vehicles?
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