Questions tagged [screeps]

Screeps is a JavaScript based, programmable web browser MMO RTS.

Screeps is a JavaScript based, programmable web browser massively multiplayer online real-time strategy game.

139 questions
3
votes
1 answer

Is it possible to have creeps swap positions moving simultaneously?

Using the moveTo() function, creeps will try to path around other creeps and this can make things inefficient when trying to minimize the amount of roads needed for creeps to get across each other. Is it possible to either have 2 creeps move…
John Martinez
  • 218
  • 1
  • 9
3
votes
3 answers

Can't spawn creep with memory

First off, I'm completely new to the game, but i know js since before. The problem I'm having is a result of me playing around in the simulator. I'm trying to spawn a creep, I started by modifying the example in the…
Olian04
  • 6,480
  • 2
  • 27
  • 54
3
votes
4 answers

How to make Screeps find sources?

In Screeps, I this code doesn't work: var sources = creep.room.find(Game.FIND_SOURCES_ACTIVE); It says this: Cannot read property 'find' of undefined I have been looking around and cannot find ANY other way to find sources. Also I've noticed that…
3
votes
3 answers

Finding structure with highest energy screeps

So I have this creep role called storer that is supposed to go fetch energy from containers and bring it to the storage. However, currently, it finds the container closest by Path and with an energy level greater to a certain threshold so that it…
ThaBomb
  • 702
  • 6
  • 11
3
votes
3 answers

Screeps Memory adding how?

I have script part that must get sources ID and store them to memory, but still don't work, please help me. for(var name in Game.spawns) { var source1 = Game.spawns[name].room.find(FIND_SOURCES) for(var i in source1) …
3
votes
3 answers

Screeps: Why does the Memory tab no longer update?

The memory seems to still be reading and writing correctly, but the memory tab always shows the initial state, as though there were no creeps or spawns in the room. It wasn't like this a couple days ago. What do I do? The problem exists in Firefox…
btd
  • 684
  • 6
  • 15
3
votes
2 answers

Game Screeps - Using the lodash module

I'm playing Screeps (http://screeps.com) and I'm trying to use the lodash module for filtering my harvesters from the rest of the creeps. The code below should work but when I run it I get a ReferenceError: _ is not defined at
:6:18. Any idea…
Lucas Azevedo
  • 1,097
  • 15
  • 36
3
votes
1 answer

Screeps Few errors / questions

I sort of want to use SO to point out a few things. First of all, It was kinda weird to 'script' in this game because unlike a 'normal' Javascript script, the way things get executed are different. We all know that in scripts, the first thing, gets…
W van Rij
  • 536
  • 2
  • 16
3
votes
2 answers

Game Screeps - Snapshots

I'm playing Screeps (http://screeps.com/) Simulation Room mode. I've tested some stuff and I don't want to lose my progress. Can I make snapshots and save my room state on the Simulation Room mode, so I don't have to start all over?
Lucas Azevedo
  • 1,097
  • 15
  • 36
3
votes
1 answer

Repair creep does not repair rampart

The following code prints out "rampart", and but the creep is just standing still and not repairing. It uses the snippet mentioned in the docs. According to the docs, structures can be repaired and rampart is a structure. What's…
PascalVKooten
  • 20,643
  • 17
  • 103
  • 160
2
votes
1 answer

Typescript Function Not Found

Source code can be found here https://github.com/zevrant/screeps I have an interface that is implemented by several classes, when i go to call the implemented interface i get the following error and i don't know why. I am a java developer and my…
Zevrant
  • 115
  • 1
  • 9
2
votes
1 answer

Screeps: can creeps suck up energy from a spawn or an extension?

I recently started this game and I love the concept, however, while waiting to up my power level in the room controller, I was browsing around and found some code that suggested that creeps could transfer energy out of the spawn. Lightbulb moment, I…
2
votes
1 answer

Every spawning creep with same role and unable to change

I am very new to this game. I followed the tutorial and tried to auto-spawn some creeps, but every creep is spawning with the same role and when I change in memory, in the next tick it gets changed back to 'upgrader'. My main script var _ =…
Júlio Campos
  • 377
  • 2
  • 14
2
votes
1 answer

How do you attack structures in Screeps?

I can attack other creeps just not the structures and I want to know how you do that, I have looked everywhere for an answer but everything I find is about how to attack another creep.
ShadowDev
  • 31
  • 3
2
votes
1 answer

Run grunt from post-commit git-hook

I'm trying to run the console command "grunt" in my GitHub repository folder every time a new commit is created using GitHub Desktop (this is to link the GitHub repository's code to my Screeps account). I've created a new file in .git/hooks…
Paolo Caponeri
  • 127
  • 4
  • 15
1 2
3
9 10