PDA

View Full Version : Option Callbacks



UrsaTeddy
August 14th, 2020, 05:08
Greetings All,

are callbacks for Settings Options restricted to a parameterless function or can parameters be passed along as well?

If we cannot pass parameters, is there a way to have a generic callback function that knows who called it and thus operate accordingly?

Moon Wizard
August 14th, 2020, 06:38
The OptionsManager script is part of the CoreRPG ruleset. During the change event, that global script only passes the name of the key that changed.

Anything else you want to store for usage when the event is triggered should be saved off in onInit script events and/or other script functions you want to track.

Regards,
JPG

UrsaTeddy
August 14th, 2020, 07:25
The OptionsManager script is part of the CoreRPG ruleset. During the change event, that global script only passes the name of the key that changed.

Anything else you want to store for usage when the event is triggered should be saved off in onInit script events and/or other script functions you want to track.

Regards,
JPG

Thank you for the information ... the key should be enough for my usage case(s).

In what variable is that key passed?