[solved] Inventory Screen

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Project_Astro
Newbie
Posts: 21
Joined: Wed Jun 13, 2018 1:02 pm
Projects: NeoLythe / Dark Investigations
Contact:

[solved] Inventory Screen

#1 Post by Project_Astro »

Hello everyone !
I feel really stupid to ask something like that but :

I found several tutorials about the Inventory system, which I didn't understand, for exemple :
viewtopic.php?f=8&t=50565&p=489377 (which is basically what I'm searching for)
or this viewtopic.php?f=51&t=23071

Well, I'm just trying to make a very simple Inventory screen where it shows you the item and the description of it. I don't need to add items, just a simple screen. And you would have a textbutton or something (I guess this is obvious) where you can click and it would lead you to thr inventory screen.
Could you help me ?

Thank you,
Project_Astro
Last edited by Project_Astro on Wed Jun 20, 2018 2:24 pm, edited 1 time in total.

User avatar
Project_Astro
Newbie
Posts: 21
Joined: Wed Jun 13, 2018 1:02 pm
Projects: NeoLythe / Dark Investigations
Contact:

Re: Inventory Screen

#2 Post by Project_Astro »

Okay so I went with using a imagemap. My problem would be now :
how to include a textbutton (or somehting like that?) during all the game so the player would be able to consult this inventory screen when they want ?

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Inventory Screen

#3 Post by Milkymalk »

Just make a screen with a button:

Code: Select all

screen inventorybutton():
    textbutton "Inventory" xalign .95 yalign .05 action Show("inventoryscreen")
Show this screen and let it sit there.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
Project_Astro
Newbie
Posts: 21
Joined: Wed Jun 13, 2018 1:02 pm
Projects: NeoLythe / Dark Investigations
Contact:

Re: Inventory Screen

#4 Post by Project_Astro »

Yeah, that's what I was trying to do, and apparently it works !
Thank you very very much !

But could you explain to me why you add "()" after the screen's name ?

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: [solved] Inventory Screen

#5 Post by Milkymalk »

You can call a screen with arguments, just like a function. I've been told that defining and calling a screen with arguments is faster than calling it without, even if it's an empty argument list, so I've made it a habit to include them.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
Project_Astro
Newbie
Posts: 21
Joined: Wed Jun 13, 2018 1:02 pm
Projects: NeoLythe / Dark Investigations
Contact:

Re: [solved] Inventory Screen

#6 Post by Project_Astro »

Oh, okay, I think I've got it.
Thank you !

Post Reply

Who is online

Users browsing this forum: Google [Bot]