Jump to content
  • 0

Building Recipe for Energy?


Ctrl-Alt-Rage

Question

4 answers to this question

Recommended Posts

  • 0

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];
};
Link to comment
Share on other sites

  • 0

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

  • 0

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...