Help with Actions in Screen Language

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
Octavise
Newbie
Posts: 15
Joined: Thu Oct 28, 2010 2:48 pm
Contact:

Help with Actions in Screen Language

#1 Post by Octavise »

Is there a screen language version of ui.interaction. I see that the screen language has some actions that return values but i have yet to find out how to retrieve said values.

The manual says "If the action returns a value, then the value is returned from an interaction."
http://www.renpy.org/doc/html/screen_ac ... ml#actions

I've been looking all over the site but I am having trouble finding anything that mentions how to access the results.

example code is:

Code: Select all

screen test_button:
    zorder 100
    textbutton "Advance" action Return(5)
any help would be greatly appreciated.

LordShiranai
Regular
Posts: 188
Joined: Wed Jul 07, 2010 5:49 pm
Completed: Mobile Food Madness, Super Otome Quest
Location: Pacific Northwest
Contact:

Re: Help with Actions in Screen Language

#2 Post by LordShiranai »

Generally, if you have a button that returns a value within a screen, you will want to use "call screen" or "renpy.call_screen" rather than "show screen."
Don't Blame Me. I Voted for Vermin Supreme.

Octavise
Newbie
Posts: 15
Joined: Thu Oct 28, 2010 2:48 pm
Contact:

Re: Help with Actions in Screen Language

#3 Post by Octavise »

Ah ... thank you for the fast response. I wondered why _return didn't work. I guess i'll have to find another method of overlays. thanks again

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Milkymalk