Suggestion: GetLastEvent()
squattingmonk
Member Posts: 59
I would like to see a GetLastEvent() function that returns one of the new EVENT_SCRIPT_* constants depending on which event triggered the script. This would allow a single script to handle multiple events and have different actions depending on the event that called it.
Currently, this can be emulated by creating an event hook script for each event; the hook sets a local variable and then calls the desired script, which checks the local variable to see which event called it. This is clunky and requires a good 70-something scripts for full event coverage. A single stock function could fix that.
Currently, this can be emulated by creating an event hook script for each event; the hook sets a local variable and then calls the desired script, which checks the local variable to see which event called it. This is clunky and requires a good 70-something scripts for full event coverage. A single stock function could fix that.
4
Comments
Oh, and it's already on the trello board as it says here