A good way to implement object function in imagebutton

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
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

A good way to implement object function in imagebutton

#1 Post by Mirrodin »

Hi guys,

I try to launch object function on imagebutton but I guess it's not the good way because I have several bug, like auto-relaunch on opening the windows wich contain the imagebutton and no real-time refresh.

Code: Select all

imagebutton idle "interface/plus.png" hover "interface/plus_hover.png" action [tour.ajouter_reconnaissance(1,0,0,0)] align (0.2, 0.2) 
How do you do this ?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: A good way to implement object function in imagebutton

#2 Post by Remix »

Maybe try:

action [ Function( tour.ajouter_reconnaissance, 1, 0, 0, 0 ) ]
Frameworks & Scriptlets:

User avatar
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Re: A good way to implement object function in imagebutton

#3 Post by Mirrodin »

It works
Aligato <3

Post Reply

Who is online

Users browsing this forum: No registered users