Portals are super useful to travel for a long distance and currently they are just non-player structures. It would be awesome to have player owned portals. I suggest a "portal framework" that can be built directly by players and powercreeps are required to activate it. To keep the game balanced, these portals cannot teleport creeps to another shard. They also have a room distance limited at 16 rooms (for example). The "out" portal can only appear at highway rooms. The activated portal can't last for a long time either (only a dozen of ticks). We can have a new power PWR_OPERATE_PORTAL
that requires high power levels and large amount of ops.
Posts made by UndefinedCpp
-
Portals that can be built by players?
-
RE: Question attacking hostile creeps
@Donatzor Thank you for that and the problem has been solved.
-
RE: Question attacking hostile creeps
@SemperRabbit Sorry, but the "safe mode" was not the problem. I tracked the return value and found that it was the
ERR_INVALID_TARGET
error, but I still had no idea why that happened. I ran the following code in simulation.module.exports.loop = function () { for(var creepname in Game.creeps) { var creep = Game.creeps[creepname]; var hostile = creep.room.find(FIND_HOSTILE_CREEPS); if(hostile) { creep.say("!"); var result = creep.attack(hostile); if(result == ERR_NOT_IN_RANGE) { creep.moveTo(hostile); } console.log(result); } else { creep.say(":)"); } } }
-
Question attacking hostile creeps
I tried method
attack
on hostile creeps, but it didn't work. The creep just move towards a hostile creep but do not attack. Can any body show me some code?