Navigation

    forum

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

    Topics created by HoPGoldy

    • Unsolved How to access HTTP endpoints bypass CORS
      Help • • HoPGoldy

      1
      1
      Posts
      2300
      Views

      No one has replied

    • Solved Error This creep doesn't exist yet with Store
      Technical Issues and Bugs • • HoPGoldy

      18
      18
      Posts
      19506
      Views

      @silentium_noxe Looping over Game.screeps after calling Spawn.createCreep and accessing any proprety defined here would cause that error. So even simple stuff like .hits would cause the error. As for the code: nothing wrong with it, I do it all the time. I recommend running your spawning logic after your creep logic (this helps avoid running out of cpu as well, if you have too many creeps you run out of cpu before you can run your spawning logic, which will intern cause you to spawn fewer creeps). You can also iterate over rooms then iterate over Room.find(FIND_MY_CREEPS), rather than all of your creeps all at once. Finally if you want to iterate over creeps that are spawning. I personally iterate over my spawns and check the spawning property and access the Creep that way, since there a fewer Spawns than Creeps.
    • Need to update the TypeScript declare at @types/screeps
      General Discussion • • HoPGoldy

      4
      4
      Posts
      5359
      Views

      If it makes it any easier to digest the changes and consider working on a PR, I've documented updates in a series of issues in the typed-screeps repository. https://github.com/screepers/typed-screeps/issues @W4rl0ck looks like a good base for a PR to update the StoreDefinition