GameMaker Studio 2: Complete Platformer Tutorial (Part 2: Animated Player)
2024 ж. 18 Мам.
643 305 Рет қаралды
▶ Source code: shaunjs.itch.io/shauns-comple...
▶ Part 1: • GameMaker Studio 2: Co...
▶ Support my work: / shaunjs
▶ Assets: www.shaunspalding.co.uk/files/...
New parts to this series released every other Friday.
FOR THOSE WHOSE PLAYERS COLLIDE INTO WALLS WHILE JUMPING: Make sure your origin point is set to Middle Centre
T8ble LIFESAVER. THANK YOU SO MUCH
Thanks man..... it worked for me.... my player was sinking in the wall....
Thanks bro a lot
HOLY CRAP THANK YOU
i was sinking in a wall figuring out what i was doing wrong aha
I love how often he says: "Okay?" to make sure that we can follow xD
The Japanese do it a lot as well.
Its sad to see that almost a million people saw the first video and only around 311k saw the second; people lose hope so quickly
I’ve done exactly what he did in the last video but my game doesn’t work
@@hassanjomaa5084 what's happening?
@@ocuorat2776 yo I got a problem too I don’t know how to explain since I’m new but my player can’t move neither jumping or left and right. it works when I didn’t add in the gravity but doesn’t after I added in the gravity.
@@minnnngo2053 didn't you forgot some line? i don't really know what is happening because i don't know your code ( if you could send it in here or something like i maybe might help ) another thing you can do is question this on the gamemaker reddit, it's a good place for getting help Note: english isn't my first language so maybe i wrote something wrong so i'm sorry
@@ocuorat2776 well you see I copied exactly what he typed but I dunno what’s wrong maybe it’s my version of gamemaker studio
I always thought coding would be boring but its really fun especially when you come across a problem and have to try to solve it then when u get it u feel so happy.
perfect description. hope you've gotten far with coding after 4 years!
how good are you at coding now?
@@ts4858 he prob is better then me now.
@@M4G_123 yeah
beter than me to
These tutorials are the whole reason why I was able to make my first game!
@@Yellow_Flare I have the same question!
@@Zworri gamecrafterstudios.itch.io/en
I think everybody is just using this for their first game
@@SjbninjaChannel yo that looks awesome! Good job dude.
Same here! :D
Hey guys, Just popping in to tell you that if you're having the issue of your sprite getting wider, then What worked for me and made it look normal was this line of code: "if (hsp != 0) image_xscale = sign(hsp) / 2.5;" I just added a /2.5 and there you go, no more wide putin. If you're having the opposite issue, I'd suggest you * 2, that way, your character will look normal, and your day won't be ruined!👌🌸
u are a legend
ye@@Thulipa3
Thx
mine works at /0.5😅
Thank you so much, legend.
The amount of details and labor is insane in these tutorials. Great source for beginners like me. Thanks a lot for the effort.
But How Do We Make Characters, If He Could Give The PNG Format Pic It Would Be Great!!
@@UMAoPLAYZ not sure if you still need it, but use something like pixel art and save it to a file, then proceed to put that image as the player
@@Z3LN0X Thanks For Your Valuable Comment, But I Have Already Finished My Project & Exported The Game Lol...
I LOVE YOU I LOVE YOU
yeah i understand... *(notices that i just followed everything he did and didn't listen to anything he said)*
Savage - Mobile Legends that's so me XD
Savage - Mobile Legends why mine split when i go left or right
That's so meee
@@djheavenagl4679 you need to put the origin point to middle center to all sprites. :3
I did listen, but the first video I slowed the velocity down, it helped me
In case this helps anyone, my problem was similar to the top comment where it states to "Make sure your origin point is set to middle centre", but I was experiencing different behaviors than what everyone else was talking about. Behavior: Whenever I turned my character around they would "blink" forward by about the space of an entire block (32px or 64px depending on the size of your sprites) and sometimes, if there was a wall in its path, the character would get stuck in the wall. Two things seem to have fixed this. 1. Make sure ALL the sprites have their origin points set to middle centre. I believe the "blink" effect was because the origin point was set to the top left and I *think* image_xscale will, in addition to flipping the image, will flip the origin point to the top right corner. So what happens when you turn around is hsp = move * walksp is effectively (not literately) adding 32px since the origin point moved 32px. 2. From my understanding, your collision mapping should be equally padded or you'll run into issues with your character getting stuck in the wall. What do I mean by padded? if one side is 14 pixels away from the edge of the sprite box, the other side needs to be 14 too. If you have 14 pixels of empty space on the left and 15 pixels on the right, it might cause that issue.
thanks for solve this problem and i fixed it
You're a life saver, definitely upvoting this comment, the whole origin point thing went over my head ❤
@@abdulsadek8911 Glad to hear my solution helped! Thanks for dropping a kind word.
THANK YOU SO MUCH!!!
for anyone who resized their character ingame and is having issue with the flipping, i used this //you could probably change the amount of times you add "sign(hsp)" // make it add itself till its equal to the amount of size its supposed to be if (hsp != 0) image_xscale = sign(hsp) + sign(hsp);
Thanks! looking for a fix for that exact problem
this was SO HELPFUL tysm
YOU ARE A LIFE SAVER TYSMM
it teleports
THANK YOU IT WORKED you da best
Just started this series and I'm loving it so far... very well presented. Already reworking some of the code from the first episode to customize and tweak my game. Sub easily earned.
These videos are still super helpful 4 years on. Thanks so much.
I made my own sprites with Aseprite and my charecter looks so goofy. But it's fun making my own "art". It looks like trash, but whatever, its *mine* :p Keep these tutorials coming, they are really helpfull and easy to follow.
The Schnensch I feel that's the most important part when creating anything. You never stop learning, so own what you make! ^-^
you can use miku miku dance mmd models to sprintes I made one it was good! you can download walk motion search in niconico videos if not found try copy it and paste in niconico search " MMD 歩きモーション "
Bruh
It aint much but its honest work.
Mine are literally just blobs
I have had so much fun with this tutorial so far. Whenever I am not working in Gamemaker I am creating art on the go. Just can't wait to have that full game. At the end of each video I am very happy with the progress, so I thank you!!
Thanks Shaun, loving your videos. This is a great resource. I especially enjoy that you explain what EXACTLY happens in a lot of cases (for example: the collision box automatically gets set around the non-transparent pixels). That gives me a feeling that I understand, vs just knowing how to do a specific thing.
Great tutorials! Coming into this knowing code slightly, it really helps when you explain what the code does! I've made my character double jump and several other things just through your explanations!
21:50 dude THANK YOU for those tangents, they really help me understand wtf everything means. DONT stop that.
Here in 2023 and this is still one the easiest to follow tutorials out there. Thank you!
I've been following along and learning more from you than any other tutorial, the way you constantly go back over things helps me remember what does what and you're a great teacher! Making a marshmellow game. Anyway, thank you! Much appreciated and lots of love
Thank you so much for these tutorials! I started off making games from scratch in python/pygame and after my 3rd game i had enough so I came to GameMaker Studio 2 and your tutorials are helping me alot.
Your Tutorial videos are as awesome as you Shaun. I was never into coding but thanks to you I am now!
Happy to help!
If anyone is having problems cause their player sprite is colliding into walls while jumping, or it's got a weird dragging effect; Make sure your origin point is set to Middle Centre for all of your sprites (thanks T8ble) Check to see what your oPlayer object's Collision Mask is. Looks like it should be sPlayer.
Hey, thanks so much I ran into this problem and tried for 30 mins to fix it.
thank you so much bro.
THANK YOU!!
it is still draggin
Thank you Dante, I was so damn confused
Thank you for these. As you say... "Beautiful, Elegant" way of handling these tutorials. Keep it up M8.
this series has already been so useful, i have been learning GML on my own now too, i could probably do all the movement again without a tutorial now, thx for this, time for guns now!
Hi Shaun, I just wanted to say that this tutorial series in particular is exactly what I'm looking for. My ultimate goal is to tackle an RPG in the future, but I figured a platformer would be a great way to learn the fundamentals and the basics of game programming using GMS2.As you make more videos in this series I was wondering if you could cover/incorporate a couple of preferred items.1. Double jump2. Wall jump to reach higher platforms3. Permanent power ups vs. temporary power ups.4. Walk vs. Run5. Duck6. Ledge grab7. Equiping a different guns (ex. switching from a 6 shooter to a machine gun)8. Health damage and health powerups9. Animating the hero as he stands still/idle10. Intro cut scenes / Game start screenI'm sure you are already thinking about a number of these but I just wanted to mention them none the less. Cheers,
I came here from a programming background, so although I knew the logic stuff and code you were explaining, I still really appreciated the way you taught it. I have never (not even on paid causes) found something so easy to follow and understand. thank you
Twisterclone would you mind helping me with mine? im stuck on how he was able to make to 4 frames of his character running. it's my first time ever doing anything with coding and I'm just curious if I could copy his player with a link or something
I watched this when I was just starting and now I'm watching this for the memories. Thanks for everything!
All of your videos have helped me out so much! My dad and I have created quiet a few games because of you.
Your first tutorial made my mom proud of me
for all of the people that their character is bugging out on the ground you need to put the origin point to Middle Centre to all of your sprites
thx, i was wondering what was happening
I’ll see if this works
Thanks so much mine was broken
done that but the bug is still here
@@casian1508 restart the app(or pc) or recheck if the origin point is at middle centre on all the game sprites
this man is a godsend
Thank you so much! What would I do without you! I was looking for those kinds of tutorials everywhere and it was very difficult to find any of these! Again thank you very very much!
Hello, I got to say you've helped me find my motivation on game design again. I did some poor joke games with old game maker when I was 9 until I was 14 when I started to play music. I kinda kept the dream of making games in the back of my head and had few ideas I never even started because of time constraints. Now I'm 24 and I am unemployed so I finally have time to learn this stuff again and better than I ever did. Your tutorials are great reminder and teach a lot of things I couldn't do back in the day. Thank you! I will surely become a Patreon next month!
Shaun, I wanted to apply a somersault animation in between the jumping and falling sprites in the code. But where in the line(s): if (!place_meeting(x,y+1,oSolid)) { sprite_index = sShinobi_Jump; image_speed = 0; if (sign(vsp) > 0) image_index = 1; else image_index = 0; } Can I do that? Can anyone help me as well? Thank you
thanks for making this tutorial series! I know it has been a few years, but it helped me understand coding a platformer type game. I have been practicing with some sprites following along and it's been fun learning this. I hope to actually get to make my first real platformer sometime soon. :3
thanks a lot. you're the only one on the Internet who explained and showed how to write code that can be written in a simple game maker
Not going to lie, your accent makes your tutorials much easier to follow. Honestly, it makes you sound really intelligent.
lol so true
A lot of people's problem here comes from the collision mask of sPlayer I think. I set it to automatic and all of my problems disappeared. Thumbs up for people to see it !
thx
Change the collision mask in the object properties from "same as sprite" to s_player also worked for me :3
I made an idle animation for my character to bob up and down. For some reason, when he is standing on the ground, he will lift upward when the bobbing down animation starts. Any idea how to fix this?
Yo! My guy! This fixed like 3 issues I was having! Thank you.
TTTTHHHXXXXXXXXXXX YOUR THE BEST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
This is fun, thanks! Everything is so easy in GameMaker. And I love your explanations too.
The most success with gm i've had so far. Thank you.
To the people who have the problem where the character gets thinner: if (hsp < 0) image_xscale = -3; if (hsp > 0) image_xscale = 3; In my case the numbers were 3, but it may change depending on the sprite.
You are a LIFE saver
Thank you for posting this. This problem was making me crazy
what about if my sprite gets wide?
general tip, put this in your create event: sIdle = sPlayerIdle sRun = sPlayerRun sFall = sPlayerFall this will basicly allow you to refer to sprites as sIdle and sFall in a simpler way. and if you end up changing the name of a sprite you can change the sprite here without having to go trough and manually changing all sprites
hey, ı have a problem with movment, when my player hit the ground all animations work wery well but my player just dosn't move any more, ı can control it when ı jump it but when touch the ground it just dosn't move. Can you help me ?
@@atakancanpolat1103 `this can be caused by multiple things. number 1: collision mask. if you switch to a different sprite you also switch the collision mask, meaning that during the transition from fall to idle/walk the coll mask might get stuck in the floor. this is fixed by just having the same collision mask for all sprites or setting the standart collision mask in your player object. number 2: not checking collision properly. ive made the mistake of sometimes putting if place_meeting(x, y, oWall) instead of if place_meeting(x, y+vsp, oWall). this makes it so that it will clip into the wall hope this helps
@@_doglo thank you man you literally helped me I was mad I just couldn't undesrtand why id didn't work it was all collision mask fault
@@tamaz_kamaz7980 no problem! happy i could be of help👍
thanks man i'll keep that in mind
Another amazing tutorial. I really feel like you're making the best tutorials I've ever seen. So detailed and you're not rushing through. I appreciate this level of tutorial. My video tutorial anxiety doesn't overwhelm me. I know this is 6 years late, but great job, I hope you keep up the amazing work! Seeing my character move around through my own control brings a tear of accomplishment to my eye.
how did u download his assets?
@@flolko4412 Oh, I didn’t. I’m just following along with my own test sprites and making boxes the same way they are in the video.
@@flolko4412 If you use Edge it will let you download the assets.
These tutorials are very useful. I needed a fresh reminder on working with Gamemaker Studio 2. Sort of works a bit different from Gamemaker 8.1
YOU ARE THE COOLEST
If your player still get stuck into walls,try this: -Set collision mask to manual -Make sure the collision mask covers all your player's feet -Make sure that all your player sprites and their collision mask are on the same level it works for me
You're a saint
Make sure your sprites are a consistant size 32x32, 64x64 whatever so the "feet" in one animation dont cause it to clip below the feet in another animation, enter the falling animation, collide IN the floor, and start the loop over.
5 years later - and still thank you. Was just getting a bit frustrated over this. Collision mask helped.
cannot thank you enough for these tutorials, re igniting the fire
Dude you are the best, your tutorials are the best what i can find on youtube! Thanks for your work)
This tutorial is amazing and is essentially my introduction to coding, but I do very much wish you would cover animating asymmetrical sprites, instead of just flipping the sprite to face your ideal direction. Everything I've tried just impedes the player character's movement. It'd be very much appreciated!
Try doing a sign hsp check for the direction
Hey shaun, I love your videos but I am stuck, after I made the jump animations for some reason my player is colliding half way through the wall objects, the collision mask is set to "same as sprite" on the wall objects
You have to go to sPlayerA and sPlayerR and make sure they are set to "middle-center" as well as sPlayer. My character sprite was clipping halfway through the blocks until I changed this.
yeah i figured this out after the fact haha. thanks!
thank you soooooo much
This didn't work for me, but changing the collision mask to sPlayer from Same as Sprite worked. If that's useful to anyone else.
God thank you this was driving me nuts.
these videos have been a real help to me so thanks for the help and for explaining things so clearly
This series is wonderful.
Instead of reading the GMS2 user manual I wish they just had a short video recording of Shaun explaining how each function / variable works in his own words. Then I could watch those videos and think, "Okay, I get it now."
i have a problem, my character only jumps when i include the second part with running.
Dude I'm sooo thankful for these tutorials!!!!
You don't have to be sorry. I am looving every second of the explanations. It ensures we know what we are doing. Also better than not giving enough detail. We aren't in a rush because Miyamoto said good games are good forever but bad games are bad forever. Or something like that. Thank you!
If Someone have Flipping sprite Issue, Image scaling Issue Do check this code replace it with existing Code of Image_xscale - "if (hsp != 0){ if (hsp > 0){ image_xscale = 3; } else image_xscale = -3; }"
thank you so much
OMG u helped me so much thank u
best thing about this tutorial no cap is if you don't make it turn around, then when you run, your character moonwalks backwards
This is bringing me much joy!
These videos are great, a lot of tutorials show you how to code things but with yours I actually understand WHY the code works. Whether I'll remember it is another story lolol
Whenever I put in the image you say it is supposed to put sprites into animation by itself but it no do dat help me please
My jump is odd, if I jump during my walk cycle it starts my animation with the final frame of the jump instead of the first fram. Works fine when i stand still.
Thank you for these brilliant tutorials 👍
Thank you for these tutorials. These tutorials have inspired me to create and code games that i can sell on Steam. Thank you :D
Your tutorials are awesome and help me in so so many ways. Question, will you ever make a RPG tutorial?
Michelle Chen yayayaya I want that too
I am quite sure that there is one, but it may be for GMS1
+1 for RPG tutorial
heartbeast channel has make a great rpg tutorial. FriendlyCosmonaut channel are making a great farming RPG tutorial.
heart.beast is also fantastic
When I try uploading my player movement it shows in 1 frame and not in more like his.
In the end i made the aniation with a complete different code because it would not with the sleep mode of the player and that the glowing eye of the player at the frame 30 is still there if you turn around (i used different sprites for right and left because the glowing eye should not switch from the right to the left eye if i turn around) however i only came up with how i can do it for myself better after i watched what you did so THANK YOU 👌❤ Ps: i really like how you explain every step for beginners, even tho i don't need it because i can write C++ and there is only a small gap between those languages it is really nice and it just shows how nice you done this series keep it up 👍
thank you so much for making these videos
Whenever i land on the ground, my idle and falling animation started flickering repeatedly while sinking into then ground. Please help?
I need help on this we need to get a bunch of likes for ppl to see this
it's a hitbox error
@@spookytheghost5877 thanks
Solved. Check all the sprites to have origin just half of the width and height of sprite and set object collision mask to the player collision mask.
@@hhcdghjjgsdrt235 Thanks man fixed my issues!
if you have an animation for your jumping / falling animation you should change the code to this: //Animation if(!place_meeting(x,y+1,oWall)) { image_speed = 0.5; //or speed 1 is fine too sprite_index = (putnameofanimationspritehere); if (sign(vsp) > 0) { sprite_index = (putnameofanimationspritehere); }
It does it when it jumps but as soon as it starts to fall it the animation changes how do I keep it so the animation stays until it lands on the ground ?
@@reecewelland8947 got same problem
Thanks man this helped alot
Thanks for your amazing tutorials! What I like is that you explain what your doing. :P
It’s fun to finally see my character animate while walking and jumping
i have a question, hope someone can help me! i'm following this tut. but i have different animation for the jumps! my animation is made by 12 frames (cause i put a"charging" effect in the sprite!) how i can tell to gms2 to read all the frames in code instead of choosing one of 2 frames like @shauns did!?
Just run it by default and it should be in an animation. You can set the frame per picture to make the animation slower or faster in the sprite editor.
image_speed = 1;
I followed the tutorial, have all sprite collision boxes on middle center. When I walk down a ledge my character starts glitching and slowly floats down then when it hits the ground it freezes and I cant even close the program (without using task manager) Whats going wrong??? (MY CODE VVV) //Get Player Input key_left = keyboard_check(vk_left); key_right = keyboard_check(vk_right); key_jump = keyboard_check_pressed(vk_space) //Calculate Movement var move = key_right - key_left; hsp = move * walksp; //Horizontal Collision if (place_meeting (x+hsp,y,obj_wall)) { while (!place_meeting(x + sign(hsp) , y, obj_wall)) { x = 1 + sign(hsp); } hsp = 0; } x = x + hsp; vsp = vsp + grv; if (place_meeting(x,y+1,obj_wall)) && (key_jump) { vsp = -7; } //Vertical Collision if (place_meeting (x,y+vsp,obj_wall)) { while (!place_meeting(x , y + sign(vsp), obj_wall)) { y = y + sign(vsp); } vsp = 0; } y = y + vsp; //Animation if (!place_meeting(x, y + 1, obj_wall)) { sprite_index = spr_Airborn; image_speed = 0; if (sign(vsp) > 0) image_index = 1; else image_index = 0; } else { image_speed = 1; if (hsp == 0) { sprite_index = spr_player; } else { sprite_index = spr_playerRunning; } } if (hsp != 0) image_xscale = sign(hsp);
my origins on middle center tho
I'm having this same issue, when I find a fix I will let you know.
Got it fixed for me. Open up your player's object properties and make sure you set a mask. It's located right under where you choose a sprite and parent for the object. Once I set the mask to my spr_player it worked just fine.
TYSM!
i know im watching this xtremely late but thanks bro (:
very nice video explaining the basics! will come in handy in other programming languages as a base too!
great tutorials, your a great teacher I'm learning alot
For those of you who are having glitching problems, make sure your sprites are all set to MIDDLE CENTER.
MY HERO
love you
you are an amazing human or alien i don't think a human could be this smart
THANK YOU
THANKYOUUUU SO MUCH
so everytime you wanna check a variable's value on an "if" conditional we should put double equals (==) ?
Yes
Super helpful thank you this is really helping me make my game keep it up
i love this kind of tutorials thx very much bro, a hug from Spain☺
Make sure all your sprites used have identical collision masks. Mine were not and my character would randomly stop moving at times :p
weird stuff : when using image_xscale = sign (hsp); my character is stretched horizontally, i've not used any arbitrary number or anything what did i do wrong? could it be something happening in the sprite?
nevermind i found the problem... for those who are having the same issue : My player Object was downscaled by default to reach 64 pixels, so when applying a xscale on the sprite, it would reset the scale of x to the original 128 pixels (but not the yscale) so make sure your sprite is at the size it's supposed to be ingame
@@FloMoonYeah thanks, i had this problem
Thank you so much i was trying to fix this all day.
@@FloMoonYeah so how did you fix it?
@@bubko-fw7tp if you scaled ur sprite while in room0 that is why its happening, just delete ur sprite from the room and re-add it and dont mess with the size
Still awesome stuff. Thank you Shaun.
what i really liked about heartbeasts's rpg tutorial is that he asked the audience to do small things without instruction (then said how to do it of course.) i think that everyone, at least to a certain extent, learns by doing.
If anyone of you have a problem with the player getting "stuck" in the ground, or just walks very unsmoothly, check your collision mask. good luck!
OMG thank you! All I had to do was change the collision mask from "Same as Sprite" to the walking animation. Thank you!
@@TheTNTerminator thank youuuuuu
Lifesaver
@@TheTNTerminator how did you do it ?
@@burgaskilek1157 You have to change the collision mask on the object from Same as Sprite to the Walking Sprite.
I need help, when I start to move left of right, my animation swaps through my player and my running animation. Jumping is fine, I only have trouble with running.
Me too, so after 2 years have u known how to fix it?
@@duynguyenanh6320 l have the same problem and hope to know the secret as well :P
@@thelegendarymushroom80 Do any of you know? Please answer.
@@gobro3900 I'm sorry, l do not know :C
@@thelegendarymushroom80 damn...
very good. I just bouth your source yesterday, waiting for it thanks.
These turorials are great
followed the coding to a t, yet somehow when the player stops holding the movement keys while on the ground, they are unable to move again until they jump. any fixes?
same problem
Really really wish there was a fix because I've followed exactly what he said and experienced the same problem as you
PROBLEM SOLVED!!! Make sure ALL of your player sprites are middle centre including jumping and moving sprites. Also make sure the hitboxes on all of the player sprites are the same
I noticed an underscore is required before the "strip[number]" when naming a spritesheet. At first I tried it with a dash and it didn't recognise my sprite as a multiple
pklz how i can find aassets idolwoad assets it only give me amepty paper argh im so fucking maD
i really love your videos its really helpfull and interactive
just awesome, thanks man and congratlations! XD
when i walk my character walks through the ground. it doesnt happen when i jump, turn og stand still though, please can someone help me ? :(
i dont know
infinite
infininte
hi
Make sure your origin point is set to the middle centre.
Hey Shaun. I'm not the best at creating pixel game art, and I can't find any good pixel art characters online. I downloaded the assets that you provided in the link description, and I was wondering if I could publish my game using your assets. So my question is, could I use your assets in a game and publish it, and if this is allowed, what would the license of the assets be(will credit be needed or not?)
if i'm right your allowed to use them because he hasn't licensed them
+ben spider thanks ;)
Noice wats ur game called?
Thank you, Shaun!
Hello Shaun! I'm doing your tutorial for a game i'm creating with lot of friends in the Global Game Jam 2021. I was trying to download the assets from the link you put in the description, but it just close right after i click. Also congratulations for the awesome tutorial! It is fast, direct to the point and complete! :)
my character keeps flickering form one sprite to another in a different place. when the character falls it flickers between the stand and fall sprites, and when i move t does the same thing. how do i fix this?
i dont know if you fixed it but go over the code, i had the same thing happen but i had spelled "sprite" "spite"
Hey, did you find a solution? I checked my code, all spelled correctly. I'm getting that flicker as well. Except for me it's between Idle and Walk
Ah never mind. For me it was because when sprite changed, it already made an intersection.. I think the method of pushing sprite out of intersection might work better.
I had this same problem. When I stopped running or jumping, the animation continued playing. I spelled sprite wrong. Look for typos if this is happening to you.
I realized I used animated sprites. And needed to use a simple none-animated sprite as collision, instead of the one from the animated sprite (even if sent to simple rectangle).
For anybody that had the same problem as me: everytime i tested if the code were ok, my player would always melt into the floor like its some sort of quicksand. what I did to fix it was to replace the + by a - on the first line below //Animation
it still not working the palyer stands just fine but when he moves half of the player body is in the ground
@@kylecrane6281 yeah i got some problems too with the code that i couldnt fix even after trying multiple attempts for 4 hours
@@Mr.LowBudget the running player sprite origin point should be in middle then it will work
@@kylecrane6281 someone suggested in another comment thread to make sure the origin of the running sprite (and airborn sprite) is set to "Middle Center." We changed origin on the original sprite in the first video but this wasn't brought up again here. If that doesn't work, maybe try changing collision mask to same as spr_player (or whatever you have named your player sprite)
@@thomasttt yea it worked I was checking every Sprite again and again until I noticed the origin wasn't in the center
You explain so well family! Keep it up
Thanks for these videos 👍 I've been thinking about buying GameMaker Studio to get back into game creation. I noticed the code is very, very similar to the Actionscript code I used to use when writing games in Flash years ago.