First of all for any who take the time to read this, you have my thanks. This is the first post I have ever made to the forum, this place has helped me in so many ways and possibly this question has been answered before but I can't seem to put in the right search criteria to find what i'm looking for.
I think I will need to do something with the set variable function. My programming language is limited to say the lease but i'm learning from the forums here.
My problem is this.
I have an image button that is part of the user interface (which appears on every screen) The user can click a button and is given a general description of the area or tips for the location.
I've set the location to default = none at the start of the game then when the first scene is called the new location is set like this
Code: Select all
screen mc_bedroom:
$ location = "mcbedroom"
imagemap:
ground 'bg/mc_bedroom.png'
idle 'bg/mc_bedroom.png'
alpha False
Code: Select all
imagebutton auto "buttons/talk_%s.png" xpos 0 ypos 0 focus_mask True action show("location_talk")
A brief example is below
Code: Select all
$ location_talk
if location = mcbedroom
"this is my room".
if location = park
"this is a nice park"
if location = beach
"Time to work on my tan"
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/switchtalk.rpy", line 2: Line is indented, but the preceding one-line python statement statement does not expect a block. Please check this line's indentation.
if location = mcbedroom
If anyone can help I would be so very grateful.