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.
-
BlindDeafDunce
- Newbie
- Posts: 10
- Joined: Sat Jun 20, 2015 5:46 pm
-
Contact:
#1
Post
by BlindDeafDunce » Sat Jun 20, 2015 6:03 pm
Hello!
May be this question has been asked. But I have not found an answer.
Prompt please: Why HeroMenu try show all time?
Code: Select all
screen HeroMenu:
$ renpy.notify("Hero Menu!")
label start:
"Text"
show screen HeroMenu
return

- Show ahead of time.
This happens even in the game menu.

- Show HeroMenu in game menu.
Thank you very much!
-
kitsalai
- Regular
- Posts: 65
- Joined: Wed Jan 08, 2014 11:05 pm
- Projects: Imaginatum
- Location: US
-
Contact:
#2
Post
by kitsalai » Sat Jun 20, 2015 7:06 pm
-
BlindDeafDunce
- Newbie
- Posts: 10
- Joined: Sat Jun 20, 2015 5:46 pm
-
Contact:
#3
Post
by BlindDeafDunce » Sat Jun 20, 2015 7:46 pm
Thank you very much!
It was necessary to use: nopredict
Code: Select all
screen HeroMenu:
$ renpy.notify("Hero Menu!")
label start:
"Text"
show screen HeroMenu nopredict
return
-
BlindDeafDunce
- Newbie
- Posts: 10
- Joined: Sat Jun 20, 2015 5:46 pm
-
Contact:
#4
Post
by BlindDeafDunce » Sat Jun 20, 2015 8:23 pm
Can you say, Why function testFunction execute all time?
Code: Select all
init python:
def testFunction():
renpy.notify("Hero Menu!")
screen HeroMenu:
textbutton "test" xalign 0.5 yalign 0.5 action testFunction()
label start:
show screen HeroMenu nopredict
"Text"
return
-
SinnyROM
- Regular
- Posts: 166
- Joined: Mon Jul 08, 2013 12:25 am
- Projects: Blue Birth
- Organization: Cosmic Static Games
-
Contact:
#5
Post
by SinnyROM » Sat Jun 20, 2015 8:26 pm
You have testfunction() in your button, which calls it immediately. Just have the function name for the action so Ren'Py can handle the call:
Code: Select all
screen HeroMenu:
textbutton "test" xalign 0.5 yalign 0.5 action testFunction
Users browsing this forum: Ocelot