Navigation

    forum

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

    Yulgalminakf

    @Yulgalminakf

    3
    Posts
    771
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Yulgalminakf Follow

    Posts made by Yulgalminakf

    • RE: Storing a variable callable from several different creeps.

      Oooooh, there's a Memory object outside of the creeps.memory. Didn't know that. TY guys! 🙂

      posted in Help
      Yulgalminakf
    • RE: Storing a variable callable from several different creeps.

      MyrddinE, the problem I have with that is it seems that the variables stored in the modules, don't save from frame to frame. They're initialized each and every tick with their default value.

      //dispatcher.constructionSites

      var currConstSite = "invalid";
      var dispatcherConstructionSites = {
      GetConstructionSite: function(room){

      currConstSite = //code to evaluate construction site here.

      }

      }
      module.exports = dispatcherConstructionSites;

       

      //role.builder
      var dispatcherConstructionSites = require('dispatcher.constructionSites');
      var roleBuilder = {
      run: function(creep) {

      var constSite = dispatcherConstructionSites.GetConstructionSite();

      }

      }

       

      This function gives back "invalid" each and every single time I call it. It's as if the variable is never even being set at all.

      The problem is, I'm fluent in C++, but for some reason, I'm lost in Java a lot.

      posted in Help
      Yulgalminakf
    • Storing a variable callable from several different creeps.

      How can I store a variable so that multiple creeps (even of different roles in different modules) can all see it? So far, the only things I can do, I have to re-calc every single tick, and that's incredibly in-efficient. 

      posted in Help
      Yulgalminakf