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: Festival Memoir
Contact:

Player added items?

#1 Post by megabuljangnan »

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: 12
Joined: Wed Jan 01, 2020 10:58 pm
Projects: Testament Legacy - Ch.1
Contact:

Re: Player added items?

#2 Post by Razka »

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: GetOutOfMyLab, Google [Bot]