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: 74
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

A good way to implement object function in imagebutton

#1 Post by Mirrodin » Wed Dec 13, 2017 8:03 am

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
Miko-Class Veteran
Posts: 659
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet
Projects: An un-named 3d anime based trainer game
Contact:

Re: A good way to implement object function in imagebutton

#2 Post by Remix » Wed Dec 13, 2017 8:08 am

Maybe try:

action [ Function( tour.ajouter_reconnaissance, 1, 0, 0, 0 ) ]

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

Re: A good way to implement object function in imagebutton

#3 Post by Mirrodin » Wed Dec 13, 2017 9:40 am

It works
Aligato <3

Post Reply

Who is online

Users browsing this forum: No registered users