Skip to content

Suggestion: GetLastEvent()

squattingmonksquattingmonk Member Posts: 59
edited April 2018 in Builders - Scripting
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.

Comments

  • prwoprwo Member Posts: 69
    edited April 2018
    Good idea.
    Oh, and it's already on the trello board as it says here
Sign In or Register to comment.