How to make menu choice disabled?
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.
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.
-
- Newbie
- Posts: 15
- Joined: Mon Aug 24, 2015 9:46 am
- Contact:
How to make menu choice disabled?
Hi,
I want to make one of the choices in a menu to be disabled, so the user is unable to select it, but I still want the choice to appear. This is because the choice hasn't been written because otherwise the wordcount will be too high, but I still want to show the example. (long story, but this is a school assignment).
I've tried using the 'if' statement, but when I do, the choice just disappears all together.
I am using the latest version of renpy 6.99.12.
I want to make one of the choices in a menu to be disabled, so the user is unable to select it, but I still want the choice to appear. This is because the choice hasn't been written because otherwise the wordcount will be too high, but I still want to show the example. (long story, but this is a school assignment).
I've tried using the 'if' statement, but when I do, the choice just disappears all together.
I am using the latest version of renpy 6.99.12.
- 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: How to make menu choice disabled?
The action of a button should define its sensitivity...
action If( "sometest > somevar", Jump('working'), None)
I say 'should' as I have not tried it, just read the docs
action If( "sometest > somevar", Jump('working'), None)
I say 'should' as I have not tried it, just read the docs
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
- 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: How to make menu choice disabled?
Oops, tested and the condition is unquoted...
action If( sometest >= somevalue, [Real actions], None)
This does not seem to alter the Hover/Idle though, so appears just the same as using NullAction...
Hopefully someone else knows how to do it without resorting to if: else: bloocks
action If( sometest >= somevalue, [Real actions], None)
This does not seem to alter the Hover/Idle though, so appears just the same as using NullAction...
Hopefully someone else knows how to do it without resorting to if: else: bloocks
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
- 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: How to make menu choice disabled?
Ah...
action If( sometest >= somevalue, [Real actions], None) sensitive sometest >= somevalue
action If( sometest >= somevalue, [Real actions], None) sensitive sometest >= somevalue
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
-
- Newbie
- Posts: 15
- Joined: Mon Aug 24, 2015 9:46 am
- Contact:
Re: How to make menu choice disabled?
Sorry, but I'm pretty terrible at coding and i cant get it to work '-_-.
My code:
I tried to do this:
this:
And a couple of more variations, but I havent been able to get it right.
The error I usually get is that theres an expected statement after If.
Thanks again!
My code:
Code: Select all
menu:
"Mannerless Idiot":
show mal pout1
extend " the mannerless idiot."
$ prince1route += 1
#disablethisone
"Clueless Idiot":
show mal pout2
extend " the clueless idiot."
$ prince2route += 1
Code: Select all
menu:
"Mannerless Idiot":
action If(prince1route >= 1, jump afterchoosing, None)
show mal pout1
extend " the mannerless idiot."
$ prince1route += 1
#disable
Code: Select all
menu:
"Mannerless Idiot": action If(prince1route = 1, jump afterchoosing, None)
show mal pout1
extend " the mannerless idiot."
$ prince1route += 1
#disable
"Clueless Idiot":
show mal pout2
extend " the clueless idiot."
$ prince2route += 1
The error I usually get is that theres an expected statement after If.
Thanks again!
-
- Regular
- Posts: 91
- Joined: Mon Jul 31, 2017 8:33 am
- Deviantart: LedianWithACamera
- Contact:
Re: How to make menu choice disabled?
Have the menu choice jump back to the menu?
Text directly before it invisibly jumps to a label, and the label is just the menu. The choice you want to disable... just jumps back to the menu! So it looks like you clicked it and it did nothing!
In theory, anyways. Would that work?
Text directly before it invisibly jumps to a label, and the label is just the menu. The choice you want to disable... just jumps back to the menu! So it looks like you clicked it and it did nothing!
In theory, anyways. Would that work?
-
- Newbie
- Posts: 15
- Joined: Mon Aug 24, 2015 9:46 am
- Contact:
Re: How to make menu choice disabled?
That... will work! Thanks!! Great idea
- AnnieTiamat
- Regular
- Posts: 53
- Joined: Tue Dec 01, 2015 3:24 pm
- Location: Seattle
- Contact:
Re: How to make menu choice disabled?
Legit that is 100% how I made disabled menu choices work.
The sad part is how long I banged my head against it before I was like WAIT I CAN JUST MAKE IT LOOP OH MY GOD I AM SO LAME
It's a great fix, though. Basically seamless
The sad part is how long I banged my head against it before I was like WAIT I CAN JUST MAKE IT LOOP OH MY GOD I AM SO LAME
It's a great fix, though. Basically seamless
Who is online
Users browsing this forum: snotwurm