Thank you so much, I was looking for this the whole night. A tip for all those who prefer code version like me, there is an option in the editor of events called Convert to GML when you do a right click, that converts everything to code. I'm starting with GameMaker and I hope to help with a little information that took me some time to find if you are new too.
It may be that your spd variable in the Create event is not a factor of your grid variable. The spd variable has to be able to divide the value of grid evenly. eg. if your grid is 48, your spd has to be 1, 2, 3, 4, 6, 8, 12, 16, 24 or 48. Let me know if that helps. Explained at 14:30 in the video.
Eric Gallery actually this is something we have to do for school and i don’t have this program home and school begins over 4 day’s but thanks for the reply ill let you know if it worked
if you are using an old versoin of gamemaker: step event: drag code: if !place_meeting(x+4,y,obj_wall) && keyboard_check(vk_right) { sprite_index = spr_heroRight; x+= spd image_speed = 0.25; } if !place_meeting(x-4,y,obj_wall) && keyboard_check(vk_left) { x-= spd sprite_index = spr_heroLeft; image_speed = 0.25; } if !place_meeting(x,y+4,obj_wall) && keyboard_check(vk_down) { y+= spd sprite_index = spr_heroDown; image_speed = 0.25; } if !place_meeting(x,y-4,obj_wall) && keyboard_check(vk_up) { y-= spd sprite_index = spr_heroUp; image_speed = 0.25; } and for key releases(left right up down) image_index = 0; image_speed = 0;
In the first example I used Key Up to get him to stop as soon as I released the key. In the maze tutorial, I don't necessarily want him to stop when I release the key. I want him to be aligned to the grid as well. So, it is programmed that when you stop pressing the key, he will continue to walk until he lines up with the grid. Let me know if that helps.
Thank you so much, I was looking for this the whole night. A tip for all those who prefer code version like me, there is an option in the editor of events called Convert to GML when you do a right click, that converts everything to code. I'm starting with GameMaker and I hope to help with a little information that took me some time to find if you are new too.
man 3am in the morning watching this solved all my project problems in one video 11/10
hey, I made the wall solid, when I played it, he walked right through it....plz help
When I "run the game" it won't make me move?
Hey can I pay you to make a game for me on game maker
How to switch rooms in this game plz tell me
How do you turn on the grid while the game is running, Thanks
The grid is a graphic I programmed into the demonstration. It is not built in.
@@EricGallery Thank You
@@EricGallery Do you have any books on gamemaker studio 2
I don't now. I got started with a workbook for GameMaker 8.0 and just picked up things along the way after that.
good job on this one buddy!
if i press a directon key the sprite goes 2 steps further than usual how can i fix this please help
Enes Yasar How far into the video did you have the problem? Do you mean it goes two grid squares too far?
Eric Gallery 33:30 i believe and yes that’s what i mean it goes like 2 grids too far once i click
It may be that your spd variable in the Create event is not a factor of your grid variable. The spd variable has to be able to divide the value of grid evenly. eg. if your grid is 48, your spd has to be 1, 2, 3, 4, 6, 8, 12, 16, 24 or 48. Let me know if that helps. Explained at 14:30 in the video.
Eric Gallery actually this is something we have to do for school and i don’t have this program home and school begins over 4 day’s but thanks for the reply ill let you know if it worked
this actually helped thank you
where is part one??
There is no part one. But here is a link to the video that shows how to make the walking sprites. ruclips.net/video/qfZxQYxLshE/видео.html
bro can u teach me how creaet endls game
Do you mean where you can walk in any direction forever? If so, I plan on making a tutorial for this for this sometime after Christmas.
ok bro
thanks you
if you are using an old versoin of gamemaker:
step event: drag code:
if !place_meeting(x+4,y,obj_wall) && keyboard_check(vk_right) {
sprite_index = spr_heroRight;
x+= spd
image_speed = 0.25;
}
if !place_meeting(x-4,y,obj_wall) && keyboard_check(vk_left) {
x-= spd
sprite_index = spr_heroLeft;
image_speed = 0.25;
}
if !place_meeting(x,y+4,obj_wall) && keyboard_check(vk_down) {
y+= spd
sprite_index = spr_heroDown;
image_speed = 0.25;
}
if !place_meeting(x,y-4,obj_wall) && keyboard_check(vk_up) {
y-= spd
sprite_index = spr_heroUp;
image_speed = 0.25;
}
and for key releases(left right up down)
image_index = 0;
image_speed = 0;
in this video:ruclips.net/video/nmRH7CbJljc/видео.html you used key up an in the correct video u didnt. wtf
In the first example I used Key Up to get him to stop as soon as I released the key. In the maze tutorial, I don't necessarily want him to stop when I release the key. I want him to be aligned to the grid as well. So, it is programmed that when you stop pressing the key, he will continue to walk until he lines up with the grid. Let me know if that helps.