The problem is, that also outside the exports.loop function, the code is executed from time to time. Not every tick but I think every 10 ticks.
Posts made by hacknet
-
RE: Code outside any loop.
-
Code outside any loop.
I want to execute code outside any game loop. It should execute only once:
var transferToController = []; var harvestEnergy = []; for(var i = 0; i < maxNumberOfCreeps; i++) { transferToController.push(true); harvestEnergy.push(false); }
It should be possible that during the game, certain variables should change but be initialized only once at the beginning outside any game loop.