Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Simple(but good) Sliding Movement

2 posters

Go down

Simple(but good) Sliding Movement Empty Simple(but good) Sliding Movement

Post by -js1210- Tue Sep 15, 2009 9:00 pm

*NOTE* originally designed for a Top Down Shooter, but should work in other games similar to that format.

So what this is is a simple(and I mean SIMPLE) movement code that uses the "Friction" function, the result is a cool sliding movement.

First create an object that will be the thing that moves.

Now put this in the Step Event:

Code:
friction = 0.5
Friction can be changed to suit needs of course

Now comes the simple part for all the directional movements just put this code in:

Code:
motion_set (direction,speed);
Obviously replacing the direction and speed with whatever you want.

And thats it!

Reviews-
"5/5"-js1210
"WOW ITS SO SIMPLE OMFG!!"- A happy customer
"A simple code that any noob coulda figured out, get a life"-an unpleasent, now desceased, individual


Last edited by -js1210- on Wed Sep 16, 2009 5:24 pm; edited 1 time in total
-js1210-
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 56532
GameML Reputation : 27
Join date : 2009-06-02
Age : 29
Location : United States

http://www.yoyogames.com/members/js1210

Back to top Go down

Simple(but good) Sliding Movement Empty Re: Simple(but good) Sliding Movement

Post by CarnivorousA Wed Sep 16, 2009 12:59 am

Congradulations, you have successfully converted d&d to gml so you look great.
CarnivorousA
CarnivorousA
Moderator
Moderator

Posts : 1402
Points : 56382
GameML Reputation : 17
Join date : 2009-06-01
Age : 29
Location : At the bottom of the lake.

http://entertainmypeople.freeforums.org/index.php

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum