Force a choices window to close with a script call

jchedges

Villager
Member
Joined
Mar 31, 2016
Messages
13
Reaction score
3
First Language
English
Primarily Uses
I apologize since I think this has been asked before, but it looked like an older threat.


Say someone wants to make a choices window timed, or simply get affected by a parallel event. How does one call the cancel handler with a script call?


I'm guessing it has something to do with this function, but I'm having syntax trouble with calling it for a currently open choices window:


Window_ChoiceList.prototype.callCancelHandler = function() {


$gameMessage.onChoice($gameMessage.choiceCancelType());


this._messageWindow.terminateMessage();


this.close();


};


I think this could have a ton of utility. I hope we can figure it out together and benefit everyone!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I haven't tested this at all, but try:

Code:
$gameMessage.onChoice(n)
where n is the index of the cancel option (or whichever option you want to be chosen when the timeout happens), keeping in mind the top one is probably index 0.
 

jchedges

Villager
Member
Joined
Mar 31, 2016
Messages
13
Reaction score
3
First Language
English
Primarily Uses
Thanks for the suggestion, but unfortunately that doesn't appear to work. I tried both from another parallel event and within the same event with no luck.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top