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.
Hi! This could be a pretty newbie question but in my game I have several screens with several buttons that, once they are clicked, they jump to different labels. The problem is that, when once of this button is clicked, if another one is clicked it interrupts the tasks of the previous button (obviously). So I would need a way to disable the buttons once I clicked in one of them. I don't want to hide them, but be inactive/insensitive.
I tried with something like this, but also stops the tasks of the previous button.
Thanks for the reply!
Sadly, I'm not able to make it work. At first, the sensitive command seems to do it well because the game starts with allowInteraction =0 and no button is working, but thenwhen my var allowInteraction is 1 (I checked on the console it really was 1) the buttons were not working (just in case, when allowInteraction is 0 no button should work, when allowInteraction is 1, all buttons should work).
I also tried the second option with
but it seems the action None still interrupts what's going on in the game.
I also tried a bit tricky option. I added an invisible screen over all the game just to try to cover the rest of the buttons with that screen, but it seems ren'py execute all the screens as if they were on the same layer, so if you click on a place with several buttons there, ren'py will execute all the actions of all those buttons.
Naisha wrote: ↑Fri Apr 16, 2021 3:46 pm
Sadly, I'm not able to make it work.
Sensitive seems to be working for me. How did you declare allowInteraction variable? You should declare it with default statement and outside of a label.