Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get number of creeps screeps

var count = Object.keys(Game.creeps).reduce(function(p, c, i, a) {return p + (Game.creeps[c].memory.role == "aRole" ? 1 : 0)}, 0)
 
PREVIOUS NEXT
Tagged: #number #creeps #screeps
ADD COMMENT
Topic
Name
5+6 =