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.
-
Lyedka
- Newbie
- Posts: 12
- Joined: Thu Jan 08, 2015 1:01 am
- Completed: Blackjack Deluxe
- Projects: Ai Aisuru, Puri-Puri, BlGame(still unnamed), D.A.
- Organization: Puzzle Deluxe
- Deviantart: Liedka
- Skype: Lyedka Panni
- Location: this way!
-
Contact:
#1
Post
by Lyedka » Sat Sep 05, 2015 11:41 am
Hello!!
wanted to know if you can add a time limit for the buttons. I know it can with the menus, but, can you add in the buttons? and if can you hide a button and after a while show again? (example: spend 5 seconds and appears a button)
Thanks for your time! and sorry for my bad English

-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#2
Post
by trooper6 » Sat Sep 05, 2015 11:51 am
You want the timer object, which is documented here:
http://www.renpy.org/doc/html/screens.html#timer
So you make a screen.
Put your button on that screen.
Put a timer on that screen that hides the screen after so many seconds.
If you want to hide after so many seconds and then show after so many seconds, I'd make two screens. One with the button, and one with the timer. Every five seconds the timer can check to see if the Button screen is visible, if it is hide the screen, if it isn't show the screen.
Though if you just want the button to "pulse" visible/not visible, you could just put a transform on the button that changes the alpha from 0 to 1 and back again.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
-
Lyedka
- Newbie
- Posts: 12
- Joined: Thu Jan 08, 2015 1:01 am
- Completed: Blackjack Deluxe
- Projects: Ai Aisuru, Puri-Puri, BlGame(still unnamed), D.A.
- Organization: Puzzle Deluxe
- Deviantart: Liedka
- Skype: Lyedka Panni
- Location: this way!
-
Contact:
#3
Post
by Lyedka » Sat Sep 05, 2015 12:39 pm
thank you very much
Another question, How could implement a system of adding points every 4 hours? (without the need for the game is in progress)
-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#4
Post
by trooper6 » Sat Sep 05, 2015 1:25 pm
Well the game can't do anything if it isn't running. Instead what I would recommend is having a persistent variable that makes a note of what time it is when you close the game, and when you load a game it checks the current time against the saved time and then gives you the points based on how much time has passed.
The clock cookbook in my signature has a realtime clock mode that you could look at and steal inspiration from.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Users browsing this forum: Google [Bot], Ocelot