Quantcast
Channel: Active questions tagged game-maker - Stack Overflow
Viewing all articles
Browse latest Browse all 189

Collision GameMaker issue

$
0
0

I'm new to GameMaker and I followed a tutorial by "Let's Learn This Together". I was trying to make collisions for my character, however every time my character bumps into the object, they get stuck and I can't control them anymore. I checked many times and I tried my own ideas, but nothing worked.

if(keyboard_check(ord("D")) && place_free(x + collisionSpeed, y)) {    x += walkSpeed;    image_speed = walkSpeed / 3;    sprite_index = sClaire_Side_Right;}if(keyboard_check(ord("A")) && place_free(x - collisionSpeed, y)) {    x -= walkSpeed;    image_speed = walkSpeed / 3;    sprite_index = sClaire_Side_Left;}if(keyboard_check(ord("W")) && place_free(x, y - collisionSpeed)) {    y -= walkSpeed;    image_speed = walkSpeed / 3;    sprite_index = sClaire_Normal_Back;}if(keyboard_check(ord("S")) && place_free(x, y + collisionSpeed)) {    y += walkSpeed;    image_speed = walkSpeed / 3;    sprite_index = sClaire_Normal;}if(keyboard_check(vk_shift)) {    walkSpeed = 7;}if(keyboard_check(vk_nokey)) {    image_speed = 0;    image_index = 0;    walkSpeed = 3.5;}

Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>