Variable as image size
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.
Variable as image size
Hi, is there a way to define an image with variable value as its size to make it update continously?
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: Variable as image size
Depends on where you want to use it I guess, if it's a screen, you can easily add zoom transform to it and pass the zoom level as a variable
Re: Variable as image size
How do you change the variable?
Here some examples:
1) In a RenPy statements:
Code: Select all
default v = 1.0
screen test_button(disp):
button:
add disp:
zoom v
action NullAction()
xalign 0.5 yalign 0.5
label start:
show screen test_button(Solid("#f00", xysize=(100,100)))
"Line - 1"
$ v = 1.5
"Line - 2"
Code: Select all
default v = 1.0
default bval = VariableValue("v", 2.0, offset = 1)
screen test_button(disp):
button:
add disp:
zoom v
action Return()
xalign 0.5 yalign 0.5
bar:
value bval
yalign 0.0
textbutton "1.2" action SetVariable('v', 1.2) xalign 0.0 yalign 0.5
textbutton "1.8" action SetVariable('v', 1.8) xalign 1.0 yalign 0.5
label start:
call screen test_button(Solid("#f00", xysize=(100,100)))
Who is online
Users browsing this forum: Majestic-12 [Bot], trailsiderice