Imagebutton usage

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
Bruni Multimedia
Regular
Posts: 87
Joined: Mon May 15, 2017 12:23 pm
Projects: General Practitioner, The Coroner Saga
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

Imagebutton usage

#1 Post by Bruni Multimedia » Sat Aug 26, 2017 4:04 pm

Hi guys.
I read the tutorials about this, but they always speak about using imagebuttons as menus, and I can't seem to make them work anyway.

I have something like this:

label pippo:
if a == 1:
scene a
elif a == 2:
scene b
elif a == 3:
scene c

if c>=3:
call rita_check from _call_rita_check_33
jump rita_1_dismiss

# HERE I PUT THE CALL SCREEN FOR IMAGEBUTTONS

menu:
"Choice" if e1_done == 0:
$ test = a
"Choice 2" if e1_done == 0:
$ test = b
"Choice 3" if e1_done == 0:
$ test = c

I'd like to use imagebuttons insteaad of menu choices, so that I can click over the scene at the coordinates of the imagebuttons.
I tried but the game always prompts me to the text choices...

Can someone help me?

User avatar
Bruni Multimedia
Regular
Posts: 87
Joined: Mon May 15, 2017 12:23 pm
Projects: General Practitioner, The Coroner Saga
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

Re: Imagebutton usage

#2 Post by Bruni Multimedia » Sat Aug 26, 2017 7:35 pm

I made it, I was calling the imagebutton in the wrong way. You can close this, sorry for wasting your time :(

BKFeng
Newbie
Posts: 13
Joined: Wed Aug 30, 2017 8:18 am
Contact:

Re: Imagebutton usage

#3 Post by BKFeng » Wed Aug 30, 2017 8:44 am

Bruni Multimedia wrote:
Sat Aug 26, 2017 7:35 pm
I made it, I was calling the imagebutton in the wrong way. You can close this, sorry for wasting your time :(
How? I'm new! I would like to learn how to make image button... Hope teacher can tell me soon! I REALLY REALLY REALLY REALLY REALLY need to know how to make image button for my battle mini game ToT
Please teach me thanks :wink:

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2681
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagebutton usage

#4 Post by Imperf3kt » Wed Aug 30, 2017 5:03 pm

Take a look at the documentation for imagebuttons, its quite well detailed with minimal coding jargon and should help get you started.
https://www.renpy.org/doc/html/screens.html#imagebutton
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Todo list:
Actually finish a project

BKFeng
Newbie
Posts: 13
Joined: Wed Aug 30, 2017 8:18 am
Contact:

Re: Imagebutton usage

#5 Post by BKFeng » Mon Sep 04, 2017 11:59 am

Thanks!

Post Reply

Who is online

Users browsing this forum: BáiYù, Google [Bot], mikolajspy