C
CreakyTeeth
Guest
Hello all,
I need some help.
Here's the code;
using GMS 2 and the code is from a video by Thomas Gervraud and Let's Learn This Together
The collision is working fine however; I'm unable to use the W and A keys to move the obj.
At first I thought I deleted something by accident; I have re-watched both video tutorials and I'm unable to find a solution to this problem.
Any help on this would be very much appreciated.
Thanks
I need some help.
Here's the code;
// Player Movement
var xMove = keyboard_check(ord("D")) && place_free(x + collisionSpeed,y) -[B] keyboard_check(ord("A")) && place_free(x - collisionSpeed,y);[/B]
var yMove = keyboard_check(ord("S")) && place_free(x, y + collisionSpeed) - [B]keyboard_check(ord("W")) && place_free(x, y - collisionSpeed);[/B]
if (xMove !=0 || yMove !=0) {
sprite_index = sPlayer;
}else{
sprite_index = sPlayer;
}
if (xMove !=0) image_xscale = xMove
x += xMove *spd
y += yMove *spd;
using GMS 2 and the code is from a video by Thomas Gervraud and Let's Learn This Together
The collision is working fine however; I'm unable to use the W and A keys to move the obj.
At first I thought I deleted something by accident; I have re-watched both video tutorials and I'm unable to find a solution to this problem.
Any help on this would be very much appreciated.
Thanks
Last edited by a moderator: