Now i use this code:
Code: Select all
def cur1():
global ccc
if ccc == 1:
ccc = 2
setattr(config, "mouse", {"default": [("cursor/2.png", 0, 0)]})
elif ccc == 2:
ccc = 3
setattr(config, "mouse", {"default": [("cursor/3.png", 0, 0)]})
elif ccc == 3:
ccc = 4
setattr(config, "mouse", {"default": [("cursor/4.png", 0, 0)]})
elif ccc == 4:
ccc = 5
setattr(config, "mouse", {"default": [("cursor/5.png", 0, 0)]})
elif ccc == 5:
ccc = 1
setattr(config, "mouse", {"default": [("cursor/1.png", 0, 0)]})
return (ccc)
config.underlay.append(renpy.Keymap(p=cur1))
If i use this function in menu, game crashes with error "list index out of range". How to avoid this?