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.
-
Westeford
- Regular
- Posts: 151
- Joined: Mon Jun 19, 2017 4:43 pm
- Completed: 12 Hours to Die
- Projects: Project Premonition
- itch: westeford
- Location: United States
-
Contact:
#1
Post
by Westeford » Mon Aug 13, 2018 6:24 pm
Just a silly idea. I want to call a statement if the player right-clicked.
Something like this.
Code: Select all
"Your inventory has been added to the pause menu."
"Right click to open the pause menu."
if [pressed right mouse button]:
"I bet you just did it now. Perhaps you noticed the save menu too."
else:
"The pause menu is also where you save. Keep that in mind."
I'm wondering if it's possible to do something like that.
Thank you for your time.
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#2
Post
by Imperf3kt » Mon Aug 13, 2018 6:39 pm
You can use a button with "alternate" action that calls a label, containing your statement.
Put it in a screen and call the screen when needed.
The button code would look like
Code: Select all
textbutton _("Press me") alternate Call mystatement
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Users browsing this forum: Bing [Bot], Google [Bot]