How to make 4 digit brass number lock

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
luat1995
Newbie
Posts: 9
Joined: Mon Nov 07, 2016 8:27 am
Location: vietnamese
Contact:

How to make 4 digit brass number lock

#1 Post by luat1995 » Mon Sep 17, 2018 8:51 pm

Hello all
I want make 4 digit brass number lock like
Image and how to make this?
Sorry my bad english, thank :mrgreen:

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1948
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to make 4 digit brass number lock

#2 Post by Imperf3kt » Mon Sep 17, 2018 9:43 pm

I'm not able to give you a code example right now, but I suggest two screens, one with your lock image and the numbers as imagebuttons, which, when clicked, calls the other screen (with kwargs to tell it which number you clicked on)
The opened screen would use renpy.input to set a variable or probably a dictionary
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

philat
Eileen-Class Veteran
Posts: 1454
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: How to make 4 digit brass number lock

#3 Post by philat » Mon Sep 17, 2018 10:01 pm

The mechanics of the lock are simple. Have some buttons set a variable for each digit, check the answer. How it should be presented is too varied for anyone to help you effectively.

User avatar
Andredron
Veteran
Posts: 207
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: How to make 4 digit brass number lock

#4 Post by Andredron » Tue Sep 18, 2018 1:08 am

luat1995 wrote:
Mon Sep 17, 2018 8:51 pm
Hello all
I want make 4 digit brass number lock like
Image and how to make this?
Sorry my bad english, thank :mrgreen:


Resurse download https://yadi.sk/d/nmggciTI3TtpWw
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

User avatar
Showsni
Miko-Class Veteran
Posts: 561
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: How to make 4 digit brass number lock

#5 Post by Showsni » Tue Sep 18, 2018 4:42 am

You don't want to make one like that, Master Lock are well known for being terrible quality :P
https://www.youtube.com/watch?v=bfDPtt-bnAI

Post Reply

Who is online

Users browsing this forum: No registered users