I want to be able to step on a pressure plate and deal fatal damage to a specific instance of a cube creature. How does one script this?
Additionally, upon using a kill command for the cube (pressing K in the editor), a prompt appears saying "warning! responder not found with id: cube". How do I remove this error?
Killing a specific creature with a pressure plate
Re: Killing a specific creature with a pressure plate
you would need to do a damageTile on it, so if it's moving around you would need to find it first to get the x/y, then run the damageTile with the correct location. You could do a setHealth first to reduce health to something like 1, then the damageTile could be small if you want, or else just crank it up to a huge number.
the warning is harmless, it is just a console message, so most players won't see it because I think most people don't have their consoles turned on
the warning is harmless, it is just a console message, so most players won't see it because I think most people don't have their consoles turned on
Finished Dungeons - complete mods to play
Re: Killing a specific creature with a pressure plate
Personally I had weird results when I tried to kill monsters with damageTile. Sometimes it wouldn't work at all, sometimes the enemies died (smoke and glitter particles appeared), but afterwards there was an invisible and invincible enemy. Maybe I had some special circumstances, but I had to spawn a spell on top of them to kill them, which was the only way to get it working properly.Komag wrote:you would need to do a damageTile on it, so if it's moving around you would need to find it first to get the x/y, then run the damageTile with the correct location. You could do a setHealth first to reduce health to something like 1, then the damageTile could be small if you want, or else just crank it up to a huge number.
the warning is harmless, it is just a console message, so most players won't see it because I think most people don't have their consoles turned on
Re: Killing a specific creature with a pressure plate
whoa, really? That sounds somewhat buggy then - I've never ran into those problems but I haven't done it a whole lot, so I don't know.
Is is possibly due to crazy huge damage used? I've only ever tried to damage them just a little more than their HP (well, I mean like if the HP was 100 I might damage 500, but that's at least not 50,000 or whatever).
Could it be something with custom defined monsters?
Maybe something with monster movement, where sometimes as they move they are sorta in two cells at once?
Is is possibly due to crazy huge damage used? I've only ever tried to damage them just a little more than their HP (well, I mean like if the HP was 100 I might damage 500, but that's at least not 50,000 or whatever).
Could it be something with custom defined monsters?
Maybe something with monster movement, where sometimes as they move they are sorta in two cells at once?
Finished Dungeons - complete mods to play
Re: Killing a specific creature with a pressure plate
I did it from the monsters.lua with a hook, maybe that was the problem. Or maybe it was because I used spawned creatures? I don't know, but I couldn't get it to work and the fire explosion looked better in my case anyway so I didn't test what was causing it.Komag wrote:whoa, really? That sounds somewhat buggy then - I've never ran into those problems but I haven't done it a whole lot, so I don't know.
Re: Killing a specific creature with a pressure plate
Another solution is to teleport the enemy to a one square place (not used into the dungeon) and spawn smoke to simulate death
Re: Killing a specific creature with a pressure plate
Well if you're going to do that you might as well just destroy() it
Finished Dungeons - complete mods to play
Re: Killing a specific creature with a pressure plate
I real issue is I want the cube to shut up, as even after I leave the room on my dungeon where it can see me it still says things like "STOP STRUGGLING!"
I figure this is hardcoded into the game, so I want the cube removed or killed when the puzzle is completed. No fancy lights or nothing.
EDIT: I'll use the destroy(). sounds like want I need, Komag. I'll let you know asap.
I figure this is hardcoded into the game, so I want the cube removed or killed when the puzzle is completed. No fancy lights or nothing.
EDIT: I'll use the destroy(). sounds like want I need, Komag. I'll let you know asap.
Re: Killing a specific creature with a pressure plate
yeah, the cube is very quirky/testy, I've worked with it extensively
Finished Dungeons - complete mods to play