For example I'd like to make a function here with say, two or three arguments, that would create a screen that replaces all instances of those arguments. E.g.
Code: Select all
screen find1: # the screen name might be made irrelevant by a function
add "background"
text _("Where is the [argument 1]?") xalign 0.5 yalign 0.03
imagebutton:
idle "[argument 1]"
xalign 0.5
ypos 1000
action Return("[argument 1]") # assets would be named appropriately
imagebutton:
idle "[argument 2]"
xalign 0.5
ypos 800
action Return("[argument 2]")
Similarly, can I do something in the script like call a function with arguments that replace the image names and certain text with the arguments?
Like:
Code: Select all
show [argument 1]
show [argument 2]
voice "prefix[argument 1]" # I suppose there might be instances where prefixes or suffixes would be necessary.
call screen [argument 1] # Basically, the arguments would be used in a variety of situations.
if result =="[argument 1]"
"Well done! You found the [argument 1]"
jump found [argument 1]
Thanks for taking the time to read this.