Search found 96 matches

by sculpteur
Wed Jan 30, 2019 5:43 am
Forum: Ren'Py Questions and Announcements
Topic: Imagebutton action subroutine
Replies: 4
Views: 149

Re: Imagebutton action subroutine

Ha ha Great ! Thank you really much !
by sculpteur
Tue Jan 29, 2019 6:52 am
Forum: Ren'Py Questions and Announcements
Topic: Imagebutton action subroutine
Replies: 4
Views: 149

Re: Imagebutton action subroutine

Yes but i don't think the ---Call(label, *args, **kwargs) --- is the best way to do it. In fact i just want the imagebutton action to be able to increment a variable. Maybe this will work better what do you think ? https://www.renpy.org/doc/html/screen_actions.html#SetVariable But the thing is I hav...
by sculpteur
Sat Jan 05, 2019 10:41 am
Forum: Ren'Py Questions and Announcements
Topic: Imagebutton action subroutine
Replies: 4
Views: 149

Imagebutton action subroutine

Hello Everyone, I have a really simple question. Is it possible to run a subroutine from an imagebutton (or imagemap) action (cliked) ? The main code : label subroutine: & add something / increment a variable return imagebutton: xpos 0.560 ypos 0.620 idle "gui/Gui_MapScreenGround_search_button_unhov...
by sculpteur
Fri Dec 21, 2018 10:27 am
Forum: Ren'Py Questions and Announcements
Topic: class Fonction synthax in imagebutton action
Replies: 8
Views: 224

Re: class Fonction synthax in imagebutton action

Wow, that's amazing.

I've never seen a message like this : your answer is so comprehensive, understandable and pedagogic !

You have not only solved my problems but you also have advanced my knowledge without any difficulty of comprehension.

Thank you so much for your time !
by sculpteur
Sun Dec 16, 2018 2:09 pm
Forum: Ren'Py Questions and Announcements
Topic: class Fonction synthax in imagebutton action
Replies: 8
Views: 224

Re: class Fonction synthax in imagebutton action

By the way, just a little extra, probably really simple for you. Do you have any idea how to change this line : for item in container_trash.items: To have a condition instead ? I'am looking for something like : Either this : if item in container_trash.items: if item in container_trash.items > 0 : Me...
by sculpteur
Sun Dec 16, 2018 1:54 pm
Forum: Ren'Py Questions and Announcements
Topic: class Fonction synthax in imagebutton action
Replies: 8
Views: 224

Re: class Fonction synthax in imagebutton action

Waw!

Yes it was this.
I'am so dumb!
With your explication everything make sens now!

Thank you really much !
by sculpteur
Fri Dec 14, 2018 8:37 pm
Forum: Ren'Py Questions and Announcements
Topic: class Fonction synthax in imagebutton action
Replies: 8
Views: 224

Re: class Fonction synthax in imagebutton action

Hey, thank you for your answer. I'am not sure too understand all of it but I still tried different combination with what you said and I can't manage to avoid the error. And I am not even sure to understand the error message. It tell me this strange thing : File "renpy/common/00action_other.rpy", lin...
by sculpteur
Thu Dec 13, 2018 3:49 pm
Forum: Ren'Py Questions and Announcements
Topic: class Fonction synthax in imagebutton action
Replies: 8
Views: 224

class Fonction synthax in imagebutton action

Hello, I got an error because i think i write the wrong synthax in this line : action [Play ("sound", "0 - sound_giveitem.mp3"), Function(Container.drop, item=item)] It's in this code : screen container_trash: # modal True for item in container_trash.items: imagebutton: xpos 900 ypos 540 idle "GUI_i...
by sculpteur
Thu Oct 11, 2018 5:57 pm
Forum: Ren'Py Questions and Announcements
Topic: Toggle a non boolean variable in an image button action
Replies: 4
Views: 152

Re: Toggle a non boolean variable in an image button action

All right great I understand know.
It's because I had declared my variable trashsession in the "start" label

Code: Select all

label start:
$ trash_session = False
So i understand know, because the start label is after init -1.
That's make sens.
Thanks again !
by sculpteur
Thu Oct 11, 2018 4:16 pm
Forum: Ren'Py Questions and Announcements
Topic: Toggle a non boolean variable in an image button action
Replies: 4
Views: 152

Re: Toggle a non boolean variable in an image button action

SetVariable( "container", (varA if container == varB else varB) ) Thank you really much dude, that's work. For some reason above my knowlegde I had to inverse it in order to make it work (varB if container == varA else varA) instead of (varA if container == varB else varB) ^^ And about your sub-not...
by sculpteur
Wed Oct 10, 2018 3:30 pm
Forum: Ren'Py Questions and Announcements
Topic: Toggle a non boolean variable in an image button action
Replies: 4
Views: 152

Toggle a non boolean variable in an image button action

Hello, I'am having an issue to do something really simple but it's because I am strugguling with imagebutton action. Even if I read carfully this page https://www.renpy.org/doc/html/screen_actions.html?highlight=imagebutton, I can't find a way to do what I want. I have this imagebutton in the mainsc...
by sculpteur
Sun May 20, 2018 2:53 pm
Forum: Ren'Py Questions and Announcements
Topic: Python item condition
Replies: 9
Views: 306

Re: Python item condition

def move_item(from_container, to_container, item): if to_container.add(item): if not from_container.drop(item): return "Failed to drop [item.name]!" else: return "Item moved" else: if to_container.has_space(): return "Failed to add [item.name] for some reason." else: return "Failed to add [item.nam...
by sculpteur
Sun May 20, 2018 2:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Python item condition
Replies: 9
Views: 306

Re: Python item condition

For example lists and dictionaries will build a better inventory system, without REWRITING from scratch basic methods (for example, a method to check or remove items). So you think differently than kivik ? You read my code and you think I can achieve the same goal and having the same invenotry fonc...
by sculpteur
Sat May 19, 2018 8:31 pm
Forum: Ren'Py Questions and Announcements
Topic: Python item condition
Replies: 9
Views: 306

Re: Python item condition

I think that might be too complicated for me. I am not good at coding in Phyton. I barely understand what a class is omg, even if I watch online tutorial about Python. It's too high level. When I saw your code, it was so simple and easy to read that I thought I could modify it and implement it in my...