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(code, key){
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?