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
It's really handy that you did this tutorial in drag and drop. I'm only beginning learning and whilst I have experience with C and JAVA for basic things like web design using GML to assign all of these actions gets pretty confusing. Especially since it's not immediately clear to me what I have to program in and what is handled by the platform. Seeing all these actions as separate but working together not only helps me in drag and drop but also it lets me know all of the actions I would need in GML. I get that once you have the hang of it GML is faster and more flexible... But for a beginner it is a bit of a minefield.
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.
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?
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?
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?
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
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.
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 ua-cam.com/video/ASeoKA8leU4/v-deo.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.
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.
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.
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 ua-cam.com/video/ASeoKA8leU4/v-deo.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
@@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: ua-cam.com/video/qfZxQYxLshE/v-deo.html
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.
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..)
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 ua-cam.com/video/0lyLkhR0xpc/v-deo.html
You saved me so much time! Strait to what I need to hear!
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!
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 >
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
It's really handy that you did this tutorial in drag and drop. I'm only beginning learning and whilst I have experience with C and JAVA for basic things like web design using GML to assign all of these actions gets pretty confusing. Especially since it's not immediately clear to me what I have to program in and what is handled by the platform. Seeing all these actions as separate but working together not only helps me in drag and drop but also it lets me know all of the actions I would need in GML. I get that once you have the hang of it GML is faster and more flexible... But for a beginner it is a bit of a minefield.
this has been an absolute life saver man, cannot thank you enough !!
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.
nice tutorial but why is your mouse pointer so big
Dude, thank you so much. This helped me a lot!
This was easy to follow. Thank you for your help. First time doing this.😊
Dude you explain this stuff really well, best tutorial I found so far, could you do one about making a basic jumping character?
thanks so much for this, it was super simple and helpful.
OMG! You're the best! Thank you so much! :) You saved me
actually really useful tutorial man thx so much
Thank you so much! This is a huge help
What an EPIC GAMER!!!!!!
thank you so much! it was great help
Great tutorial! Straight and to the point! Great job!
tysm man!
Ur so underrated have a sub thanks!!!
Very nice thanks!
Thanks, and you're welcome
You saved my butt me dude :33
Wow you made those sprites good shit
I love you thanks for this ima binge watch all these ༼ つ ◕_◕ ༽つ❤❤
Thanks!
Thank YOU! :))))
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?
Just what I need to make my rpg
Thank you
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.
THANKSSSSS
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?
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?
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?
tysm
thanks dude this will make murdirous mansion come out sonner
thanks
Can you do a tutorial on room transistions?
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
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.
i love you
Can you make a video like this but include 8 way directional movement?
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 ua-cam.com/video/ASeoKA8leU4/v-deo.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.
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)
This doesn't work fro some reason- i do have physics on though, does that interfere?
what if i wanna make it to dance when i press letter on keyboard how do i make that
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.
the toturial is incredible but what about collisions
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.
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
when i want to create event it shows me the console not the thing u have...
so i did this but now it just walks threw the wall object
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
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 ua-cam.com/video/ASeoKA8leU4/v-deo.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 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: ua-cam.com/video/qfZxQYxLshE/v-deo.html
If they are the code would be something like sprite_index=spr_sonicrunningleft
how do you get the toolbox out
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.
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:
ua-cam.com/video/qfZxQYxLshE/v-deo.html
@@EricGallery Thanks a lot!
how do i set the key
Anya work for me video?
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
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.
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..)
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.
how to get the toolbox?????????
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
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
how did he get the toolbox?
im thinking the same thing
"simple character movement"
TWENTY FIVE MINUTES
25 minutes?!?!?!?
didnt work
Pls gamr maker language
My Asteroids tutorial uses Game Maker Language (ua-cam.com/video/0lyLkhR0xpc/v-deo.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
ua-cam.com/video/0lyLkhR0xpc/v-deo.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