In the current state of things, there's a lot of stuff that's harder to do in trying to make a custom monster than it really seems like it needs to be. If I want a monster to do something special when it dies or is stunned, or even if I simply wanted to make a custom brain that specific custom monsters responded to by behaving as if "
brained"
when a normal brain would brain regular monsters, it's possible but much harder than I'd like it to be. The following things would make this sort of thing easier:
-Wait for entity at [location or location range] to be Stunned: Returns true if there is currently a stunned monster at the specified location, false otherwise. This would be good for properly "
braining"
custom monsters with standard brains. Regular monsters act unbrained if the only brain(s) in the room is(are) stunned; custom monsters should do the same, but currently can't.
-OnStunned: A special label that the code
GoSubs to automatically whenever the character running the script is stunned (by a stick or whatever). This would enable monsters to do all sorts of custom things when stunned or pushed by a stick-type thing. In particular this would allow "
custom"
brains to tell a variable that they've been stunned this turn. I'm aware this could be worked around by setting Imperative Not Stunnable and then detecting when the monster is pushed and "
stunning"
it manually in that case by a Wait 0 turn, but this comes without the "
I'm stunned"
graphic to let the player know what's going on.
-OnDeath: Similar to OnStunned, another special label the code
GoTos to whenever the monster encounters any event that should kill it (so if it's Imperative invulnerable, this would still fire on it falling down a pit or being stabbed by briar). Characters with this label in them should
not die for the purposes of scripting under any circumstances other than being given "
Imperative Die"
, which a good scripter would only put inside of the OnDeath label itself. This would be good, again, for handling a custom brain. It would also be good for (for example) a custom monster that generates another custom monster when it dies, or a monster that explodes when it dies, so on, so forth.
-Wait for Entity at [location] to Die: If OnDeath is too difficult to include, putting this on an invisible external character who handles the aforementioned business would work as an alternative, firing only on turns when a monster in the indicated area dies. Right now (if I'm not mistaken), the only thing like this is a command that detects whether or not a monster has died in the
entire room, which isn't terribly helpful.
____________________________
109th Skywatcher
Here are some links to Things!
Click here to view the secret text