I'm building the key like this
var key = [$gameMap._mapId, $gameMap._interpreter._eventId, 'D'];
afaikt the event looks good from the console the event and map id's are okay...
I set the self switch like this
$gameSelfSwitches.setValue(key, true);
after the plugin command (the self switch is left alone only if a dialog is cancelled) I check the self switch in the event after the plugin command and it never seems to be set...
argh I see whats happening
the plugin command is finishing right away, (there is a choices callback waiting....)
the self switch is being set in the callback, so I need some way for the event to wait for the callback, any ideas?
What are you trying to do? Please show us a screenshot of your event.
I ended up doing things differently handling the cash in the plugin command...
that said it would still be helpful to know how to wait for an option (initiated within a plugin)
for example...
in a plugin command open an choices, with a callback (in the callback just throw something to the console log)
in the event if you run the plugin command, and then say flash the screen, when the event is triggered the screen will immediately flash as the choices dialog is shown...
looking in your console log you'll notice that once you have clicked a choice you get the console log feedback you'd expect
I'd quite like some way to block the event until after the choices callback has happened -ie choice inside the plugin is shown, user makes a selection, and only then the screen flashes - this way if the callback changes something like an self switch the code in the event after the plugin command will see it...
I can re-write some code as a plugin to demo this if I've just plain confused you!