Jumbofile Posted November 23, 2012 Author Share Posted November 23, 2012 This is an easy tutorialGo to or make you player object.make the player object be visible and the depth -5make a left facing and right facing sprite and set the right sprite as defaultadd a step event: add an execute code action and insert this code```if (place_free(x+0,y+1))gravity_direction=270;gravity=0.5;elsegravity_direction=270;gravity=0;if (vspeed>12)vspeed=12;```add a key press event for the key up: add an execute code action and insert this code```{if !(place_free(x+0,y+1))vspeed=-10;}```Now jumping should workMake a left walking animation for your character.Add a key press event for the key left: add an execute code action and insert this code```hspeed=-4;sprite_index= name of sprite for left walk;image_index=0;image_speed=1;```Make a right walking animations for your characterAdd a key press event for the key right: add an execute code action and insert this code```hspeed=4;sprite_index= name of sprite for right walk;image_index=0;image_speed=1;```Make a key release for left key: add an execute code action and insert this code```hspeed=0;sprite_index= name of sprite facing leftimage_index=0;image_speed=1;```Make a key release for right key: add an execute code action and insert this code```hspeed=0;sprite_index= name of sprite facing rightimage_index=0;image_speed=1;```You now have to add make a platform so the dont fall out of the screenMake a sprite 32x32 or 16x16 and fill the square a solid colormake an object called platform and put the default sprite as the sprite you just made.Add a collision event: add an execute code action and insert this code```move_contact_solid(direction,12);vspeed=0;```Paste your platform and you character in a room and you have a walking side scroll character! Link to comment Share on other sites More sharing options...
Marsh Posted November 23, 2012 Share Posted November 23, 2012 This brings back memories.Bad ones. Link to comment Share on other sites More sharing options...
Marsh Posted November 23, 2012 Share Posted November 23, 2012 This brings back memories.Bad ones. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 23, 2012 Share Posted November 23, 2012 lol Marshy Dearest, Game Maker ain't so bad x3(except the damn lag if you have too many objects ._.) Link to comment Share on other sites More sharing options...
JohnPony Posted November 23, 2012 Share Posted November 23, 2012 GM's syntax sucks. Link to comment Share on other sites More sharing options...
Marsh Posted November 23, 2012 Share Posted November 23, 2012 > GM's syntax sucks.Syntax is fine, basically the same c++Try to walk up a slope, there you will find the many many flaws of game maker. Also it ignores way to many errors. That sounds great. except them telling you something wrong is better then just having things go wrong. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 23, 2012 Share Posted November 23, 2012 > Syntax is fine, basically the same c++> > Try to walk up a slope, there you will find the many many flaws of game maker. Also it ignores way to many errors. That sounds great. except them telling you something wrong is better then just having things go wrong.lol Going up a slope isn't that hard, it's just a few lines of code and you got a perfect slope system Link to comment Share on other sites More sharing options...
JohnPony Posted November 24, 2012 Share Posted November 24, 2012 > Syntax is fine, basically the same c++> > Try to walk up a slope, there you will find the many many flaws of game maker. Also it ignores way to many errors. That sounds great. except them telling you something wrong is better then just having things go wrong.It doesn't have brackets, something that helps the code to look pretty and organized. Link to comment Share on other sites More sharing options...
TheRexion Posted November 24, 2012 Share Posted November 24, 2012 Actually, you can use brackets in GML if you want. It recognizes them just the same. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now