Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. hacknet
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    hacknet

    @hacknet

    2
    Posts
    1147
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    hacknet Follow

    Posts made by hacknet

    • RE: Code outside any loop.

      @deft-code

      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.

      posted in Help
      hacknet
    • 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.

      posted in Help
      hacknet