Navigation

    forum

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

    Posts made by jaf2k

    • RE: Where to put prototype extends?

      I looked around in the forum and this seems to be a common problem. Not sure why to include a console at all if you can't it use to access your code.

      posted in Help
      jaf2k
    • RE: Where to put prototype extends?

      Yeah I messed up the MD part and didn't find the edit button.

      Interestingly it works when I put the call to the added prototype method in the script tab, but it doesn't work in the console.

      posted in Help
      jaf2k
    • Where to put prototype extends?

      I tried to use the code example from the docs:

          Spawn.prototype.createWorkerCreep = function(name) {
              return this.createCreep([WORK, CARRY, MOVE], name);
          };
      

      When I try to execute:

      Game.spawns.Spawn1.createWorkerCreep('Worker1');
      

      I get an error saying the function is not defined.

      I put this as the first thing in my main module in the script section. Is this correct? If someone could enlighten me what I am doing wrong here, that'd be great.

      Thanks.

      posted in Help
      jaf2k