I was fairly sure that a request for something like this exists, but my feeble thread-searching skills couldn't locate anything specific, so here it is. This is a request for some special labels in DROD script, comparable to the ones in RPG's scripting. Obviously the needs of DROD are distinct from those of RPG, but I think there are still some situations where you'd want a character to react to a situation in a way that interrupts its normal behavior loop.
On Death: The most important one to me personally.
Anything that kills the entity, be it stabbing, burning, dropping into a pit or water, attack tile kill, blowing up...whatever, immediately jumps execution of the character's script to this label. This is basically necessary to make things like custom golems, constructs, fegundos, or anything else that's supposed to do something special when it "
dies"
. And let me be perfectly clear on this as someone who has tried and semi-succeeded at doing this before:
Currently existing workarounds are inadequate to this purpose. They require
way too much overhead and work on the architect's part in a manner which heavily discourages the re-use of anything that attempts to function this way. They are very prone to weird bugs based on move order problems that one just plain shouldn't have to worry about.
On [Event]: A lesser request. For a number of room events like tarstuff growth, briar growth, eyes waking up, and so on, it'd probably be cool to have designated labels for an automatic interrupt that's triggered by those events.
Token: I think this has been requested elsewhere and something
like it is possible mid-implementation, but I might as well say it just for the record. The concept in my head for this label is that the label either includes coordinates (which is more flexible) or refers to the location of the character, and jumps to this label whenever something that would've activated a token happens to the relevant location. That includes player/double stepping on the tile, "
activate item at"
from another script elsewhere, scripted entities and the like that can activate tokens. Fairly simple.
On Explosion/fuse: A nice label that would be helpful for "
custom bombs"
, which amounts to just a way to detect that the tile it's on either had a lit fuse burn out on it (the way it does under a powder keg) or an explosion happen to it. Similar to the above, it could designate a tile, or possibly just check the tile under the character who's running it. I'm less confident that this needs to be a custom label rather than a wait for that could go inside of an if statement, but as long as I'm naming things I may as well include it. Actually, that also applies to the "
Token"
part too now that I think of it.
____________________________
109th Skywatcher
Here are some links to Things!
Click here to view the secret text
[Last edited by Xindaris at 11-10-2020 04:56 AM]