sir thank you your a lifesaver, i didnt even watch the whole video and i have already gotten farther then i could have if i worked by myself with no tutorials. Thank you for this. im making an undertale-like RPG.
I know this is old, but to anyone finding this, I suggest you not use set direction and instead just set the "Set Speed" node to type: Horizontal for left and right and type: Vertical for up and down, make the speed negative on UP and Left, so using the variable example in the video, you type "-spd" this gets rid of the issue where combining key presses by pressing something like Up then Left/right at the same time can't combine while left then up/down works
Okay, so, I wanted my character to move diagonally, so I used the jump to point method, which works. However, whenever I try to walk diagonally up against a wall, my character freezes. I want to know if there's any way to fix this.
My sprite continues to move with 'set animation speed' at 0. Not sure where I went wrong on following this or if the functionality changed on GM /edit: figured it out. my sprite must have glitched on the room after deleting and replacing it on the room, it worked like a charm.
Hey, is there a way to make it that when the character walks up and is facing right, he does the right walking animation, and when he is facing left, he does the left walking animation when going up, instead of making a walk up animation? And vice versa for down?
thank you ! but if i tap a direction quickly he doesnt take a step and still moves \slides, if i set sprite to frame 1 it breaks the animation speed. also i dont understand why "spd" is connected to set animation speed in the create event
Nice tutorial. Using this for one of my games, HalfWay. However, I have one thing I'd like to do... Make it to where Jayde (The player) will sit. Seems easy enough. Just have to make it to where when down is pressed he'll play the sitting animation... But one issue I have is that I want him to face the direction he was already facing when standing up... Is there any way to do this?
this vid is 5 years ago but i'm having trouble with moving on the ground. for some reason my character isn't moving on the ground but it can move while hovering (i'm making a 2d platformer)
Since everyone is being mean let me explain, for each key down, you have to add a key up, that says to set the speed to 0 and anispd to 0 so keydown right keyup right.
When I hold down the 'right' key for example, my character moves to the right, and then if I press the 'down' key, he moves down even if I am still holding down the 'right' key. This is great, but it does not happen for all the directions. If I hold right and then hold up, the character does not go up until I let go of the right key. I can't figure out where the difference lies. How do I make it so that every key press is like the first example, so that no matter what key I'm holding in, a new direction will be activated when the associated key is pressed?
It sounds like 8 Directions Movement could help you. Even if you do not want to move diagonally (8), you can tell the program to move as though you only have 4, I believe. If this nice creator doesn't have a video on it yet, the creator FriendlyCosmonaut does.
Anyone figure out how to "wall hug" against a wall. So that we slide along while angle walking, as opposed to stopping dead if you are holding a direction against the wall?
If you want to be able to move diagonally by pressing two keys, you will need to use the Jump to Point action. For the Left key, set the x to -4 relative, and x to 0 relative. For Right, x to 4 relative, y to 0 relative. For Up, x to 0 relative, y to -4 relative. For Down, x to 0 relative, y to 4 relative. It is kind of demonstrated in my Platform video here ruclips.net/video/ASeoKA8leU4/видео.htmlm2s
You would have to find a spritesheet with images at those angles. If you do a search for "spritesheet diagonal" or spritesheet 8-way" you may find something you are looking for.
So I have a problem? I did everything in the video but my character seems to glitch out. So when i move left and right its all good, up and down is fine, but if I go from left or right to up and down it glitches like a few cm away from where the character was.
I’m gonna be real here, There are way better tutorials than this most scripts start with this (Not to be rude) If (keyboard_check(vk_something)) or you can do “ if (keyboard_check(ord(“Letter”))) And under that you do this: Sprite_index = sPlayer etc After that: Walkspeed: something. And then copy all that and do the same thing. It’s way more simple than this. Really hope this helped inexperienced coders and game developers. And as he explained it in DND™ || GML is easier for inexperienced coders and game developers So I will write the whole code here for the create event. Create: Image_speed = 0; Walkspeed = 3.5; //or lower. Next we move on to the step (Feel free to copy and paste this) If (keyboard_check(ord(“D”))) { x += walkSpeed; image_speed = walkSpeed /3; sprite_index = ??? } If (keyboard_check(ord(“A”))) { x -= walkSpeed; image_speed = walkSpeed /3; sprite_index = ??? } If (keyboard_check(ord(“S”))) { y += walkSpeed; image_speed = walkSpeed /3; sprite_index = ??? } If (keyboard_check(ord(“A”))) { y -= walkSpeed; image_speed = walkSpeed /3; sprite_index = ??? } And that’s it. For collision just add a collision to the player object which is simple There will be advanced here soon for platformer lol anyways enjoy this. But I know this is a long as hell comment but it’s useful for most starters. So you don’t need to like or anything but it’s appreciated so haha please sub at least (This whole comment took me 38 minutes to write..)
If you want to be able to move diagonally by pressing two keys, you will need to use the Jump to Point action. For the Left key, set the x to -4 relative, and x to 0 relative. For Right, x to 4 relative, y to 0 relative. For Up, x to 0 relative, y to -4 relative. For Down, x to 0 relative, y to 4 relative. It is kind of demonstrated in my Platform video here ruclips.net/video/ASeoKA8leU4/видео.htmlm2s
@@EricGallery thank u for ur answer i have kinda little problem cuz im new in gamemaker im kinda from the tgf2 /mmf2/click team 2.5 community i dont know anything about this can u help me a little? (im looking for some tutorials on DND with RPG styles and ideas ... like battles movement quests chests enemys ... TEXT showing things... ya know ... :S
I had the same problem, and I was able to figure out how to fix it. After you create and event, right click on the event (such as 'Create') and convert it to DnD. Once the toolbox is opened you can delete the DnD instance that appears and it wont effect the movement. I did the rest of the tutorial like this and it worked fine.
@@EricGallery i'm doing code right now and if you have any understanding of how to use it, i'm trying make my sprite move, when i press the right key and, i'm struggling figure out how to make it move, since i've made it change its instance, but it doesn't move, stays in the same play as the idle sprite instance, just wondering if you know how to get it to work, i've also put this in a step event, the only event that i have right now. if keyboard_check_pressed(vk_right) x -= 5; { instance_change(obj_sonicrunning1, true) }
Also, it looks like you are changing objects. Just change the sprite to the left facing sprites. are your sprites separated by direction? If not, watch this tutorial to show how to do that: ruclips.net/video/qfZxQYxLshE/видео.html
Hi guy I realy like the vídeo this realy can save my skin, BUUUTTT I realy like know if do you can teach us how the caracter can walk woth out commander. I mean same like a RPG NPC caracter. cold you teach us?
You did realize that this a tutorial for beginners brand new to GameMaker, right? If you want some GML go to my Asteroids tutorial ruclips.net/video/0lyLkhR0xpc/видео.html
You saved me so much time! Strait to what I need to hear!
sir thank you your a lifesaver, i didnt even watch the whole video and i have already gotten farther then i could have if i worked by myself with no tutorials. Thank you for this. im making an undertale-like RPG.
ye me too making undertale fan game
^v^
same >
Fantastic tutorial series! Well thought out and explained - much appreciated!
This video was extremely helpful. I watched this since I needed more understanding for my class and this was really well done, thanks!
I know this is old, but to anyone finding this, I suggest you not use set direction and instead just set the "Set Speed" node to type: Horizontal for left and right and type: Vertical for up and down, make the speed negative on UP and Left, so using the variable example in the video, you type "-spd"
this gets rid of the issue where combining key presses by pressing something like Up then Left/right at the same time can't combine while left then up/down works
mate you are waffling
thanks so much friend
this also changes your movement from 4 direction to 8 direction (diagonal) so make sure that's what you want
How would you make your character slide on a wall if I use up+right for example?
@@Mangeurdemouton you can have the player collide with the wall. also gamemaker manual has very smooth 8 way movement that I recommend
nice tutorial but why is your mouse pointer so big
Dude you explain this stuff really well, best tutorial I found so far, could you do one about making a basic jumping character?
this has been an absolute life saver man, cannot thank you enough !!
This was easy to follow. Thank you for your help. First time doing this.😊
Thanks so much for the video Eric! This helped me out a ton. Your style is also so very likeable and beginner friendly. :D
Thank you, tell all of your friends.
What an EPIC GAMER!!!!!!
actually really useful tutorial man thx so much
Can you do a tutorial on room transistions?
Okay, so, I wanted my character to move diagonally, so I used the jump to point method, which works. However, whenever I try to walk diagonally up against a wall, my character freezes.
I want to know if there's any way to fix this.
My sprite continues to move with 'set animation speed' at 0. Not sure where I went wrong on following this or if the functionality changed on GM
/edit: figured it out. my sprite must have glitched on the room after deleting and replacing it on the room, it worked like a charm.
Finally a helpful guide thank you
But my character have an animation for when the player doesn't press anything how do I apply it?
Hey, is there a way to make it that when the character walks up and is facing right, he does the right walking animation, and when he is facing left, he does the left walking animation when going up, instead of making a walk up animation? And vice versa for down?
Can you make a video like this but include 8 way directional movement?
thank you ! but if i tap a direction quickly he doesnt take a step and still moves \slides, if i set sprite to frame 1 it breaks the animation speed. also i dont understand why "spd" is connected to set animation speed in the create event
thanks so much for this, it was super simple and helpful.
thank you so much! it was great help
Dude, thank you so much. This helped me a lot!
Wow you made those sprites good shit
the toturial is incredible but what about collisions
Nice tutorial. Using this for one of my games, HalfWay. However, I have one thing I'd like to do... Make it to where Jayde (The player) will sit. Seems easy enough. Just have to make it to where when down is pressed he'll play the sitting animation... But one issue I have is that I want him to face the direction he was already facing when standing up... Is there any way to do this?
this vid is 5 years ago but i'm having trouble with moving on the ground. for some reason my character isn't moving on the ground but it can move while hovering (i'm making a 2d platformer)
Ur so underrated have a sub thanks!!!
Hey Eric! I did all these steps, and yet my sprite is still going forever, and will not stop moving. What do I do?
Since everyone is being mean let me explain, for each key down, you have to add a key up, that says to set the speed to 0 and anispd to 0 so keydown right keyup right.
Just what I need to make my rpg
what if i wanna make it to dance when i press letter on keyboard how do i make that
Great tutorial! Straight and to the point! Great job!
I love you thanks for this ima binge watch all these ༼ つ ◕_◕ ༽つ❤❤
when i want to create event it shows me the console not the thing u have...
thanks dude this will make murdirous mansion come out sonner
Very nice thanks!
Thanks, and you're welcome
When I hold down the 'right' key for example, my character moves to the right, and then if I press the 'down' key, he moves down even if I am still holding down the 'right' key. This is great, but it does not happen for all the directions. If I hold right and then hold up, the character does not go up until I let go of the right key. I can't figure out where the difference lies. How do I make it so that every key press is like the first example, so that no matter what key I'm holding in, a new direction will be activated when the associated key is pressed?
It sounds like 8 Directions Movement could help you. Even if you do not want to move diagonally (8), you can tell the program to move as though you only have 4, I believe. If this nice creator doesn't have a video on it yet, the creator FriendlyCosmonaut does.
Thank you so much! This is a huge help
how do you get the toolbox out
Anyone figure out how to "wall hug" against a wall. So that we slide along while angle walking, as opposed to stopping dead if you are holding a direction against the wall?
This doesn't work fro some reason- i do have physics on though, does that interfere?
how do i set the key
so i did this but now it just walks threw the wall object
this saved me
tysm man!
OMG! You're the best! Thank you so much! :) You saved me
Thank you
im completely new. You say set up the sprites? how? i have a sprite sheet with all the sprites on. How do i separate them?
Watch this video:
ruclips.net/video/qfZxQYxLshE/видео.html
@@EricGallery Thanks a lot!
very useful, thank you. For the diagonal, if i have to press 2 keys (ex: up and left), do i have to code? or can i do it manually?
If you want to be able to move diagonally by pressing two keys, you will need to use the Jump to Point action. For the Left key, set the x to -4 relative, and x to 0 relative. For Right, x to 4 relative, y to 0 relative. For Up, x to 0 relative, y to -4 relative. For Down, x to 0 relative, y to 4 relative. It is kind of demonstrated in my Platform video here ruclips.net/video/ASeoKA8leU4/видео.htmlm2s
@@EricGallery What if I want the player to rotate to look diagnolly while moving in that direction? How do I do that?
You would have to find a spritesheet with images at those angles. If you do a search for "spritesheet diagonal" or spritesheet 8-way" you may find something you are looking for.
how to get the toolbox?????????
So I have a problem? I did everything in the video but my character seems to glitch out. So when i move left and right its all good, up and down is fine, but if I go from left or right to up and down it glitches like a few cm away from where the character was.
I'm having the exact same issue, did you ever figure it out?
@@sevynwhatley3951 I'm having a similar problem but mine keeps looking to the left instead of down like it's supposed and its annoying lol
8:58 when i'm at here,
my sprite said to me
bye bye~
What do you mean by "bye bye"?
@@EricGallery
The sprite is not longer on the screen
I’m gonna be real here, There are way better tutorials than this most scripts start with this (Not to be rude)
If (keyboard_check(vk_something)) or you can do “ if (keyboard_check(ord(“Letter”)))
And under that you do this: Sprite_index = sPlayer etc
After that: Walkspeed: something.
And then copy all that and do the same thing. It’s way more simple than this.
Really hope this helped inexperienced coders and game developers.
And as he explained it in DND™ || GML is easier for inexperienced coders and game developers
So I will write the whole code here for the create event.
Create:
Image_speed = 0;
Walkspeed = 3.5; //or lower.
Next we move on to the step (Feel free to copy and paste this)
If (keyboard_check(ord(“D”))) {
x += walkSpeed;
image_speed = walkSpeed /3;
sprite_index = ???
}
If (keyboard_check(ord(“A”))) {
x -= walkSpeed;
image_speed = walkSpeed /3;
sprite_index = ???
}
If (keyboard_check(ord(“S”))) {
y += walkSpeed;
image_speed = walkSpeed /3;
sprite_index = ???
}
If (keyboard_check(ord(“A”))) {
y -= walkSpeed;
image_speed = walkSpeed /3;
sprite_index = ???
}
And that’s it.
For collision just add a collision to the player object which is simple
There will be advanced here soon for platformer lol anyways enjoy this.
But I know this is a long as hell comment but it’s useful for most starters.
So you don’t need to like or anything but it’s appreciated so haha please sub at least
(This whole comment took me 38 minutes to write..)
tysm
but what if i wanna move up and right at the same time ... ?
If you want to be able to move diagonally by pressing two keys, you will need to use the Jump to Point action. For the Left key, set the x to -4 relative, and x to 0 relative. For Right, x to 4 relative, y to 0 relative. For Up, x to 0 relative, y to -4 relative. For Down, x to 0 relative, y to 4 relative. It is kind of demonstrated in my Platform video here ruclips.net/video/ASeoKA8leU4/видео.htmlm2s
@@EricGallery thank u for ur answer
i have kinda little problem cuz im new in gamemaker
im kinda from the tgf2 /mmf2/click team 2.5 community
i dont know anything about this
can u help me a little? (im looking for some tutorials on DND with RPG styles and ideas ...
like battles movement quests chests enemys ... TEXT showing things... ya know ... :S
When I move my sprite, first up and then left or right it glitches a few inches lower than it should be, how do I fix this?
you need to set the axis in the same spot for all of your sprites! :)
@@hellstrays7134 Mine Jst Stays to the left when i walk even though i did everything he said. I'll try your advice! thanks
@@hellstrays7134 still does the same shit XD DARN IT
thanks
THANKSSSSS
Thank YOU! :))))
how did he get the toolbox?
im thinking the same thing
When i create an event it shows no instances. Any ideas?
I had the same problem, and I was able to figure out how to fix it. After you create and event, right click on the event (such as 'Create') and convert it to DnD. Once the toolbox is opened you can delete the DnD instance that appears and it wont effect the movement. I did the rest of the tutorial like this and it worked fine.
when i comes to momentum of a sprite thats moving is it better to use code for that or drag and drop
I would normally use code, but this tutorial is for Drag and Drop.
@@EricGallery
i'm doing code right now and if you have any understanding of how to use it, i'm trying make my sprite move, when i press the right key and, i'm struggling figure out how to make it move, since i've made it change its instance, but it doesn't move, stays in the same play as the idle sprite instance, just wondering if you know how to get it to work, i've also put this in a step event, the only event that i have right now.
if keyboard_check_pressed(vk_right) x -= 5;
{
instance_change(obj_sonicrunning1, true)
}
Move the moving command into the brackets like this
if keyboard_check_pressed(vk_right)
{
x -= 5;
instance_change(obj_sonicrunning1, true)
;
}
Also, it looks like you are changing objects. Just change the sprite to the left facing sprites.
are your sprites separated by direction? If not, watch this tutorial to show how to do that: ruclips.net/video/qfZxQYxLshE/видео.html
If they are the code would be something like sprite_index=spr_sonicrunningleft
the charachter doesn't appear for me. can you give some advice?
Where in the video are you having the problem? Can you see the character listed under Objects in the Resources window?
@@EricGallery in the room the background is black and the character is not showing up. yes i see it.
Thanks!
You saved my butt me dude :33
Anya work for me video?
what do you use to make the sprites?!?
I just found them doing an image search on Google like "spritesheet 4x4"
lol had a feeling u did, they look low quality and shrunk.... no offense
i mean there pretty detailed and look pretty good tho but just pretty small like it just got smushed.
mine wont stop moviinggg )))):
i love you
One thing that irritates me actually is that you did not indicate this was drag and drop tutorial otherwise I wouldn't have watched it
thats a big cursor
Hi guy I realy like the vídeo this realy can save my skin, BUUUTTT I realy like know if do you can teach us how the caracter can walk woth out commander. I mean same like a RPG NPC caracter. cold you teach us?
probably from the create event you can add movement and loop it
25 minutes?!?!?!?
didnt work
Pls gamr maker language
My Asteroids tutorial uses Game Maker Language (ruclips.net/video/0lyLkhR0xpc/видео.html)
A
Nooob, you use Drag and drop
You did realize that this a tutorial for beginners brand new to GameMaker, right?
If you want some GML go to my Asteroids tutorial
ruclips.net/video/0lyLkhR0xpc/видео.html
You look like a guy who got 6 minutes into making a game, accidentally deleted your idle sprite, and quit trying to code a game