Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Game maker tutorial: sliding

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
624 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 3, 2010

Here will I simply teach you how to make your player slide...
If you got any complications or problems feel free to comment in the section below.

Ps: my "obj_hero" is my player. If you are wondering about that.

And ofcourse remember to like and comment!

Subscribe if you want more tutorials in the future!

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (lalabEsjen)

  • I have 3 questions:

    Why do you refer to 'obj_hero' from within obj_hero?

    Why would you set the hspeed to 0 if hspeed is already 0?

    And why do you put a 0 after the 1 when setting friction?

    I'm not trying to be mean I sincerely want to know why.

  • @grungegames First Question answer: It isn't necessary to write Obj_hero.Hspeed, but I did it because it looks better. :) But you would have to refer to the player, if you were writing codes on another objects.

    Second Question answer: If I didn't setted the hspeed to 0, would the hspeed continued going down, which means that I would begun to accelrate backwards. Also when the Hspeed reaches 0 after the sliding will the player stop untill you are moving again. Last Question comes at a new comment

  • @grungegames Third Question answered: If you mean this line; "Friction = 0.10", can I explain it easily. I dont really know why I wrote that. actually It isn't necesarry to type 0 after the 1. It is enough to just type in this "Friction = 0.1".

    You know; 0.1 = 0.10 = 0.100 = 0.1000 = 0.100000 etc.

  • Yo, it's claiming my object doesn't exist...the name is Player, I write it like 'obj_player' in the execute code and when I touch the ice it gives me a error pop-up.

    Please help.

  • @Supertoad25 Well I am pretty sure I can help you out, but first you have to show me all the codes that you typed in that's involving sliding. Then will I most likely find whats wrong ;)

    When I saying show the codes, I mean that you are duplicating your codes from game maker into a comment as a reply.

see all

All Comments (14)

Sign In or Sign Up now to post a comment!
  • @rastinder If you're talking about the line between "friction = 0.01" and "if obj_hero.hspeed" then it would be because it looks cleaner and is easier to read. I do it all the time, it separates the blocks of code that don't belong with each other; what belongs is up to you.

  • @grungegames u havent asked why he skipped 3rd line in coding

  • thanks, I like this Video and it helps me a lot to create a better game

  • how did you program your hero's default movement. i mean, how is he going to move when he's not on ice?

  • @lalabEsjen Well, I discussed this somewhere else...so I don't have it, but I can retype it:

    hspeed = -4

    friction = 0.10

    if obj_Player.hspeed = 0

    {

    hspeed = 0

    }

    ;Player moves at a speed of 1, also I renamed him 'Hero' to see if that would work, but it didn't.

    Also I took the liberty of writing vspeed for up and down.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more