Player added items?

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
megabuljangnan
Newbie
Posts: 1
Joined: Mon Aug 26, 2019 12:19 am
Projects: The Eternal Day
Contact:

Player added items?

#1 Post by megabuljangnan » Sun Jan 05, 2020 3:25 pm

Might be a stupid question, but is there any way I could have players add their own items? For example, if they were a shopkeeper, how could I add a system where they would add and customize their own items?

User avatar
Razka
Newbie
Posts: 9
Joined: Wed Jan 01, 2020 10:58 pm
Projects: Testament Legacy - Ch.1
Contact:

Re: Player added items?

#2 Post by Razka » Sun Jan 05, 2020 5:43 pm

I've been doing the exact same stuff in the last few days so I might be able to help.

I'm not sure what you mean with "Customize their own items" but you can use simple boolean variables to check wheter the player has it or not.

Code: Select all

define mcHasCrowbar = False
    menu:
        "Should I buy something?"

        "Crowbar" if not mcHasCrowbar:
            $mcHasCrowbar = True
            $money -= 5000;

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Imperf3kt