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.
UndefinedCpp
@UndefinedCpp
4
Posts
1604
Profile views
0
Followers
0
Following
Posts made by UndefinedCpp
-
Portals that can be built by players?posted in Feature Requests
-
RE: Question attacking hostile creepsposted in Help
@Donatzor Thank you for that and the problem has been solved.
-
RE: Question attacking hostile creepsposted in Help
@SemperRabbit Sorry, but the "safe mode" was not the problem. I tracked the return value and found that it was the
ERR_INVALID_TARGETerror, 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 creepsposted in Help
I tried method
attackon 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?