What are the actions an imagebutton can execute?

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
User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

What are the actions an imagebutton can execute?

#1 Post by Evildumdum » Sat Jun 27, 2015 12:41 pm

Okay, so thanks to alera i can create a semi decent imagebutton screen. However as far as actions the imagebuttons can perform, i only know of and know how to use Jump. I've been attempting to use call but it hasn't worked so far.

Does anyone know where i can find a list of actions imagebuttons can execute and what they do?
"If at first you don't succeed, try hitting it with a shoe."

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: What are the actions an imagebutton can execute?

#2 Post by trooper6 » Sat Jun 27, 2015 12:50 pm

This is all in the documentation: http://www.renpy.org/doc/html/screen_actions.html

If you haven't read the documentation yet beyond the QuickStart, I highly recommend it. It has a lot of great and important information on how to code Ren'py.
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

User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Re: What are the actions an imagebutton can execute?

#3 Post by Evildumdum » Sat Jun 27, 2015 1:46 pm

Thanks. I've found something that i think will do the job:

ui.callsinnewcontext
"If at first you don't succeed, try hitting it with a shoe."

User avatar
xavimat
Eileen-Class Veteran
Posts: 1458
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: What are the actions an imagebutton can execute?

#4 Post by xavimat » Sat Jun 27, 2015 3:10 pm

Better not use ui. functions at the beginning. Try to understand screen language.
The "callsinnewcontext" seems a pretty advanced thing.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
SinnyROM
Regular
Posts: 166
Joined: Mon Jul 08, 2013 12:25 am
Projects: Blue Birth
Organization: Cosmic Static Games
Contact:

Re: What are the actions an imagebutton can execute?

#5 Post by SinnyROM » Sat Jun 27, 2015 4:01 pm

If you only need to show a screen in a new context, the action ShowTransient() may be enough. I suggest giving it a try before attempting ui.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: What are the actions an imagebutton can execute?

#6 Post by trooper6 » Sat Jun 27, 2015 7:43 pm

If you want to show a screen, you can also just Show. So...what exactly are you trying to do?
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

User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Re: What are the actions an imagebutton can execute?

#7 Post by Evildumdum » Sun Jun 28, 2015 3:14 am

Basically i want to display imagebuttons that show you a stats screen, map or inventory respectively when clicked. The problem that i was having was that i wanted the screen to show without affecting the flow. My game is not linear. After the tutorial it is a free roam world where all choices stack and affect what happens next. The world itself is designed as a loop which can be expanded and content added, but there is no set path. If the button was clicked, the required action would be executed, but i could only return to a fixed point, which did not exist since the player could click it from anywhere. I wont pretend to know how it works, but ui.callsinnewcontext calls the screen as an overlap to the existing screen and returns to the exact point that was left without terminating the circular world loop.

I found it here http://www.renpy.org/wiki/renpy/doc/coo ... ion_Screen
"If at first you don't succeed, try hitting it with a shoe."

Post Reply

Who is online

Users browsing this forum: Ocelot