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!
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: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


Simple(but good) Sliding Movement

View previous topic View next topic Go down

Simple(but good) Sliding Movement

Post by -js1210- on 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
avatar
-js1210-
Super 500 GML
Super 500 GML

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

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: Simple(but good) Sliding Movement

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

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

_________________
avatar
CarnivorousA
Moderator
Moderator

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

View user profile http://entertainmypeople.freeforums.org/index.php

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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