Sometimes I have found that it seems onerous or wasteful to create map/global switches for one-off events. Sometimes I wish I could have a cutscene event tell another event that it needs to change its state and keep those state changes local/encapsulated to each event.
I've added a plugin command called SELFSWITCH which will allow one event to control the "self switch" of another event.
SELFSWITCH <event_id> [switch=A|B|C|D] [value=ON|OFF]E.g.:
SELFSWITCH 1 A ONThere may be a better way to accomplish this but I hope maybe this little script will come in handy for someone else.
https://github.com/caseylutz/KCL-MV/blob/master/KCL_SetSelfSwitch.js
If you use a helper library, FindEventByName, then you can call out your event ID by its canonical name rather than its event ID number.
https://github.com/caseylutz/KCL-MV/blob/master/KCL_FindEventByName.js
E.g.:
SELFSWITCH ENGLISH_VILLAGER_001 B ONNote: You may omit the switch and value parameters. The defaults will be "A" and "ON" respectively.
EDIT: Plug-in moved to GitHub.
I've added a plugin command called SELFSWITCH which will allow one event to control the "self switch" of another event.
SELFSWITCH <event_id> [switch=A|B|C|D] [value=ON|OFF]E.g.:
SELFSWITCH 1 A ONThere may be a better way to accomplish this but I hope maybe this little script will come in handy for someone else.
https://github.com/caseylutz/KCL-MV/blob/master/KCL_SetSelfSwitch.js
If you use a helper library, FindEventByName, then you can call out your event ID by its canonical name rather than its event ID number.
https://github.com/caseylutz/KCL-MV/blob/master/KCL_FindEventByName.js
E.g.:
SELFSWITCH ENGLISH_VILLAGER_001 B ONNote: You may omit the switch and value parameters. The defaults will be "A" and "ON" respectively.
EDIT: Plug-in moved to GitHub.