Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Not the most elegant way of making your character turn around, but if your character
- // is just one unanimated sprite it'll do the job.
- if (free==true){ // locks the player when you talk to someone/something
- switch(keyboard_key){
- case ord('A'):
- image_angle=180;
- x-=Speed;
- break;
- case ord('D'):
- image_angle=0;
- x+=Speed;
- break;
- case ord('S'):
- image_angle=270;
- y+=Speed;
- break;
- case ord('W'):
- image_angle=90;
- y-=Speed;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment