Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Yeah, sorry, a tutorial is planned but on the back-burner a bit.

Ultimately the only thing you NEED is to call the script.
You do the work to determine the direction you want the character to move in.
You do the work to determine the speed you want the character to move.

Pass both of those to the script and it will take care of the rest.

So the absolutely easiest implementation would be this:

var _hori = keyboard_check(vk_right) - keyboard_check(vk_left);
var _vert = keyboard_check(vk_down) - keyboard_check(vk_up);

var _dir = -1;
if(point_distance(0,0,_hori,_vert) > 0) {
    _dir = point_direction(0,0,_hori,_vert);
}
movement_and_collision(_dir,walkSpeed,oWall)

If you have further questions, feel free to hit me up on Discord.  DMs are open to anyone who has joined the GMS Discord Server: https://discord.gg/By6u9pC