-you are playing the game, clicking through text and reading it as normal
-from a small button above the textbox, you open the inventory, a screen with a list of textbuttons generated from the list of your items
-from the inventory, you click a textbutton open this screen showing details about the placholderitem item
Code: Select all
screen placeholderitem:
frame:
has vbox
text "blah blah there's a lot of text here"
textbutton "Use" action ???() #uses the item (button only present if the item in question is usable, if it isn't I just won't put the button here)
textbutton "Drop" action ???() #deletes ONE of the item from the inventory (button only present if the item in question is droppable, if it isn't I just won't put the button here)
textbutton "Back" action Return() #goes back
The use button will first determine whether or not the item can be used where you are, and then do one of two things. If the item cannot be used, it will call another screen, which will simply say 'sorry you can't use that here' and then have a button to go back to the item screen. However, if it CAN be used, it will jump to a label of visual novely texty stuff, not a screen.
How would I go about the calculations for 'does x = y and a = b"? I'm pretty sure that can't be done in a screen, so would I have to jump then call a screen? Can I even jump from a screen? Can I calculate them in a screen?
The drop button will subtract one from your total amount of the item. Every item exists as a sort of dictionary of properties- with an item name, an item type, and an amount. When you click the drop button, it will edit the amount property to be one less than it was before, and then exit the whole inventory screen to whatever you were doing before you opened the inventory (hence me describing how you get to this screen, as you might need to know that), because if you have dropped all of that item (say you only had one and you got rid of it), and the amount of that item now equaled 0, it would be removed from your list of items, and that item would then no longer show up in the list of buttons on your inventory screen.
Same problems as above, lots of "set x to y if a = b" stuff involved, which I can do just fine, but I don't know where to put them and how to start it off.
I've been looking all over, but can't find any documentation on a way to do this- however, from what I can decipher from others' forum posts, it looks like there's a command called "callsinnewcontext()" might be what I need. Is this the action I am looking for? (Warning: I haven't tested any of this yet because all of these screens are buried under a whoooole lot of read-this-opening-dialogue-before-it-lets-you-do-anything, so it's very hard to just boot up my project and noodle around with, so I'm working on taking all this code out and putting it in its own project for testing and whatnot. I might just be talking nonsense. Plz forgive me if i am)