Thread: Keybinding
View Single Post
Old
MagicLocked
Junior Member
 
Status: Offline
Posts: 1
Join Date: Sep 2018
Default 09-10-2018, 02:28 PM

[QUOTE=SlithyToves;25322]hgs was hinting about how to do it, and I will give a little clearer hint, I hope. Your code will need to be something like,
Code:
this.pirate add Keylistener: declare procedure KeyPressed, with parameter KeyEvent w
do in order
Here is where you will need to choose whether to move the pirate or not.
You will need to choose from the list(image attached) one that will let you choose "if ___ is TRUE do ___" and "if ___ is FALSE do ___ (in your case, nothing)"


How do I set my key event to "w"?
   
Reply With Quote