View Single Post
  #9  
Old 07-07-2013, 09:13 PM
brokk brokk is offline
Registered User
Join Date: May 2012
Posts: 84
brokk is on a distinguished road
I have another question when it comes to the default movement. As we know, the direction keys on the keyboard make the player move up, left, down, and right. Is there a command to make the player move using the default movement?

For example:
PHP Code:
function onKeyPressed(codekey){
 if (
key == "z"){
 
//player will move left using default movement
 
}

I realize I could just do player.x -= 0.5; But I want to use the default tile collision.

I know it's a complex question kinda, hopefully someone can help!


AND I would also like to add, disabledefmovement() will disable the whole movement system, is there a function to just disable the ability to move instead of disabling everything such as the sword, tile detection, etc?
__________________
No matter how much I hate graal, I'm always coming back.

smh

Last edited by brokk; 07-07-2013 at 10:22 PM..
Reply With Quote