Hi,
I am at loss as to how to do this. Basically, what I want to accomplish is to have the second window display the item chosen from the first window. Aside from that, enable the user to go back to the first window if he press cancelled on the second window.
What's happening here is that the second help window is not displaying the item selected from the first window. I used a global variable to take note of the item selected on the first window, but it doesn't update for the second help window...
I've attached my code for reference (sorry for the amount of console logs and comments).
PLEASE TURN OFF YOUR CAPS LOCK NEXT TIME WHEN WRITING A TITLE, WE CAN READ IT WELL EVEN WITHOUT IT. THANK YOU.
Anyway, your second window is missing a method called createContents. This will create an array of items, where item is data.
For example in a normal buy window an item consists of this data:
item name, item price. Possibly item quantity owned.
This then gets drawn inside a Window_Selectable prototype.
I can hardly help you more, because I am kinda lost in your plugin.
Thanks for the suggestion! It worked wonderfully. The remaining concern that I have for this script (aside from the actual fusion computation process I'm dreading to work on) is that the 'cancel' process is not working and the 'ok' process keeps them shifting windows.
For example, I'm at window 1, then I pressed ok, I'll proceed to window 2. After pressing OK, I'll go back to window 1... which shouldn't really be the case. The actual fusion result would be shown after pressing OK on window 2 (provided that the fusion is valid), if invalid it will not push through (the actual fusion result would be the third window, which is a work in progress at this point. So I was hoping that the entire thing would close once I press OK on window 2).
I'm planning to make the code simpler, but for now I'll work on this as soon as I got everything running as expected (so at least I have a working copy), then I'll slowly go and make the codes much simpler.
Here's the updated code that I have.
The advice I have for you there is that everything must be handled explicitly. It always helps to make yourself a flow chart - what window becomes active when the player selects a choice, what window becomes active when the player presses 'esc', and so on. Each possibility on the flow chart has to be handled by your code.
Specifically here, you can look at the window that the player uses in the Select Item event command (I don't remember what that window is called but you should be able to find it). That window is the closest to what you're doing with choices while on the map scene. It should have handlers for 'ok' and 'cancel' that are defined, so you could do something similar in order to control what happens on 'ok' and 'cancel'.
Alright, thanks I'll experiment on that later. For now, I'll put this for a short rest and sleep (it's 1 AM). I'll continue this later. Thank you!
With a bit of experimentation, I managed to make everything flow as intended... I was even able to add the result of the fusion (Yay!)
This is the hard part, I guess, which is opening a new window that displays the status of the result (only for those that are valid. If not, then buzzer will play). This window would also have the option that asks the player if he wants to proceed with the fusion or not. If not, he goes back to the previous screen (Window 2). If yes, then proceed fusion (add in the new member to party, remove the two ingredients from current party).
I'm having trouble disabling selection for invalid entries, as well as making a new window (I tried copying the window_status menu, but it doesn't have the option asking the user to select yes or no on it).
I cleaned up the code a bit to reduce the number of windows from 4 to 2... but now, the help window isn't updating, and the game crashes if I try to select the result...
EDIT:
I did a small workaround by temporarily adding the result as a party member so we can display the result... I found out why the game crashes...
The issue now is that the results window remains to be open unless I opened the game menu and exit it. Aside from that, I do not know how to proceed adding in the option window on the results window (an option that asks the player 'yes' or 'no'. Yes would mean that the result is permanently added to the party. No, means player goes back to the previous screen).