- Sep 30, 2018
- 102
- 70
I define a variable in script.rpy
Now, in my screen ui (another rpy file), i have textbutton and tooltips.
_test is always "" if I define "", None if I define None... never assign by SetVariable ?
An idea ?
Python:
default _test = ""
# I tried to define in screen, it's the same
Python:
screen ui:
zorder 105
imagemap:
.../...
if len(Hero.weapons)>0:
textbutton "{b}" + findWeaponName(Hero.weapons[0]) + "{/b}" xpos 815 ypos 940: #size 35
action SetVariable("_test", "weapons") # tried (_test, "weapons") it's the same
tooltip "Description"
.../...
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip][_test]" # tried "[tooltip]{}".format(_test) it's the same
An idea ?