add the ability to add custom sfx for certain events (i.e. a creep attacking, nuker launching, nuker ready to launch, activating/deactivating safe mode, capturing room controller, alerts such as a creep detecting an enemy and such, buildings being built, towers attacking/repairing, creep repairing, creep healing, creep spawning, creep spawned, PC ability usage, etc)
notauser
@notauser
3
Posts
580
Profile views
0
Followers
0
Following
Posts made by notauser
-
custom sound effects
-
how to make turrets target NPC invaders
I have the basic code for the turret straight from the documentation with some modifications but it doesn't seem to target the NPC invaders for some reason, btw the code isn't recognizing the NPC invaders in the testing environment, its not returning an error but it just flashes red (which if I remember correctly indicates it works but It cant do anything).
var hostiles = Game.rooms[roomName].find(FIND_HOSTILE_CREEPS); if(hostiles.length > 0) { var username = hostiles[0].owner.username; game.notify('HOSTILE UNIT SPOTTED BY TOWER IN ROOM ' + roomName); var towers = game.rooms[roomName].find(FIND_MY_STRUCTURES, {filter: {structureType: STRUCTURE_TOWER}}); towers.forEach(tower => tower.attack(hostiles[0])); }
any solutions?