I am currently trying to assign keyboard keys to specific actions. I've managed to bind keys to jump to specific scenes, but other commands that I can enter normally (or make follow from standard "menu" buttons) return errors following the key assignment. To be more specific, I wish to make a key trigger a temporary show event (~1 second) as well as modify a variable counter.
In the sample code below, the "W" key functions as assigned. The middle three keys return errors, saying: "expected a keyword argument, colon, or end of line."
The game will launch with the final key ("F"), but if the key is pressed, the game will crash, returning an error that "Screen Hikage 1 is not known."
Code: Select all
image Hikage 1 = "Hikage.png"
$ hikage_pt = 10
screen actionkeys:
key "K_w" action Jump ("start.mirailand")
key "K_a" action $ hikage_pt -= 1
key "K_s" action $ hikage_pt -= 5
key "K_d" action hikage_pt += 5
key "K_f" action show ("Hikage 1")
Any help in setting me straight would be appreciated.