How to move by tile?

Talk about making games.

How to move by tile?

Postby code4242 » Fri Dec 28, 2007 9:41 pm

Does any one know how to make a charactor move in tiles instead of freely?
Current project: Teratism
User avatar
code4242
 
Posts: 40
Joined: Tue Dec 11, 2007 9:01 pm
Location: Sitting at my laptop :D
Score: 0 Give a positive score

Re: How to move by tile?

Postby MrScience101 » Sat Dec 29, 2007 1:54 am

Oh that's tough. The easiest might be to have the player actor move to the center of the tile whenever it collides with a tile. Just create an event when a collision happens that moves the actor to the center of the collision tile.
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: How to move by tile?

Postby Fuzzy » Sat Dec 29, 2007 7:47 am

If your tiles are 32x32 then use keydown "right arrow" -> script editor -> x=x+32;
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron