I'm currently looking at the possibilities of coding a Point & Click game in Ren'py.
I want the player to click on a character sprite to initiate a conversation.
So I put an imagebutton inside a screen.
Code: Select all
screen waldo_small_L:
imagebutton:
idle "images/waldo_small_L.png"
xanchor 0.5 yanchor 0.5
xpos 1123 ypos 580 focus_mask None
action Jump("waldo_dialoog")
Code: Select all
label waldo_dialoog:
hide screen waldo_small_L
show waldo neutral at center
wr "Hey."This is the code I used to create a custom mouse cursor:
Code: Select all
init 1 python:
def change_cursor(type="default"):
persistent.mouse = type
if type == "default":
setattr(config, "mouse", {"default": [("images/mouse_pointer.png", 8.0, 0.0)]})
elif type == "hover":
setattr(config, "mouse", {"default": [("images/mouse_pointer_hover.png", 8.0, 0.0)]})
if not hasattr(persistent, "mouse"):
change_cursor()
else:
change_cursor(persistent.mouse)I guess it has to do something with a variable. But maybe someone here has an idea how to go about this.