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.
-
PKLucky
- Newbie
- Posts: 23
- Joined: Mon Mar 05, 2018 7:30 pm
- Projects: The Witch's Black Cat
- Tumblr: pklucky
- Deviantart: pklpikachu
- itch: pklucky
-
Contact:
#1
Post
by PKLucky » Sat Mar 10, 2018 1:01 pm
Hey guys, I'm trying to use ScreenVariableValue for sliders in my game, but the sliders won't move when I use that. I checked the code for the Ren'Py tutorial and all the sliders there work fine with ScreenVariableValue, so I'm not sure what I'm missing in my code to get it to work.
Here's my code:
Code: Select all
bar value ScreenVariableValue("study_pt", 15) style "slider"
Last edited by
PKLucky on Sat Mar 10, 2018 2:52 pm, edited 1 time in total.
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#2
Post
by Ocelot » Sat Mar 10, 2018 1:03 pm
How did you define your variable in screen?
< < insert Rick Cook quote here > >
-
PKLucky
- Newbie
- Posts: 23
- Joined: Mon Mar 05, 2018 7:30 pm
- Projects: The Witch's Black Cat
- Tumblr: pklucky
- Deviantart: pklpikachu
- itch: pklucky
-
Contact:
#3
Post
by PKLucky » Sat Mar 10, 2018 1:29 pm
I had it defined in script.rpy like this:
Do I need to put this in screens.rpy as well?
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#4
Post
by Ocelot » Sat Mar 10, 2018 1:36 pm
You are using for adjusting screen variable, as implied by the name. It will not do anything for common variables. You probably want VariableValue instead.
< < insert Rick Cook quote here > >
-
PKLucky
- Newbie
- Posts: 23
- Joined: Mon Mar 05, 2018 7:30 pm
- Projects: The Witch's Black Cat
- Tumblr: pklucky
- Deviantart: pklpikachu
- itch: pklucky
-
Contact:
#5
Post
by PKLucky » Sat Mar 10, 2018 1:41 pm
Ok got it. Thanks!
Users browsing this forum: Google [Bot], Majestic-12 [Bot], nyeowmi