Hello weary traveler...
I was writing a script the other day.. The script in question simply makes a few window, one of which is a child of the default number input window.
Now, basically, the window should replicate the default number input window, but it doesnt...
The default window - when shown with some text (via show text event command then input number event command) once the user has selected their number, they press enter to confirm number, both the number window and show text window process to the next step, the event continues to process etc..
Now when I open my child of number input window, which has to be done via script call of course, it does not trigger until the show text has finished processing. Meaning, both windows do not show at the same time. If I call the scripted window before showing text, even though the correct button is pressed to trigger both windows progressing (enter key) only the show text window progresses and I have to repress enter to make the input number window progress.
So... Now you know my issue..
Here is an example of how I structured the evented show text / number input (the working version)
[event command :: show text][event command :: Input number]So I tried to replicate that by doing...
[event command :: show text][Script Call :: Opens child of Input number]^ this does not work. The script call is not triggered until after the show text has been confirmed via enter key.
Then i tried to open the window before showing text, this does allow both windows to display as intended, but as mentioned, when the enter key is pressed, it does not confirm both windows.
I have o idea why this is happening, but any light you could shed on this would be greatly appreciated. ^_^
Making a window close...
● ARCHIVED · READ-ONLY
-
-
How about this @@a ?
#-------------------------------------------------------------------------- # * Show Text #-------------------------------------------------------------------------- def command_101 wait_for_message $game_message.face_name = @params[0] $game_message.face_index = @params[1] $game_message.background = @params[2] $game_message.position = @params[3] while next_event_code == 401 # Text data @index += 1 $game_message.add(@list[@index].parameters[0]) end case next_event_code when 102 # Show Choices @index += 1 setup_choices(@list[@index].parameters) when 103 # Input Number @index += 1 setup_num_input(@list[@index].parameters) when 104 # Select Item @index += 1 setup_item_choice(@list[@index].parameters) end wait_for_message endYou see, you can manipulate command_103 method, overwrite it maybe or messing with it?
def command_103 wait_for_message setup_num_input(@params) Fiber.yield while $game_message.num_input? endHaha sorry if not helping XD -
nah i got what your saying, i kinda came to a similar conclusion whilst waiting for a reply.. my fix simply adds an escape char that opens the window, but the issue of them not both closing persists.
I will try out the route you suggest and see if that helps any :p -
Because input window of event command is still a part of the show text. Or at least, show text considers the possibility of the input window being present.. Now that behavior isn't inherited probably because it's not defined on the processing method for show text.
Basically, the behavior is because of how the interpreter runs show text, instead of the number input window itself -
Sall good.
I fixed the issue by doing the following...
I made the new window Yeild whilst open to cease all other event processing - check
I made the new window open before the show text command, so both windows are opened - check
Cause the input window is yeilding the input window takes the first enter press as its own - rather than show text window getting it - check
then insert
Code:Issue solved. :)\^ [\code] into the end of my show text window to have it autoclose.. - check.