grid question

Non-platform specific questions.

grid question

Postby otro » Wed Jan 02, 2008 12:09 am

Hello,
I'd like to make a 16x16 pixels grid that controls all my actors movement ! how can i do this?
if someone got a good script or if this has been already asked in a previous topic, let me know !
thanks by advance!!!!
otro
 
Posts: 5
Joined: Mon Dec 25, 2006 8:54 am
Score: 0 Give a positive score

Re: grid question

Postby Fuzzy » Wed Jan 02, 2008 6:21 am

Make a global var. call it Step or something. set it to 16.

Now in your keydown events do this
** right arrow**
Code: Select all
x +=Step;


** left arrow**
Code: Select all
x -=Step;


** Up arrow**
Code: Select all
y -=Step;


** down arrow**
Code: Select all
y +=Step;
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 General

Who is online

Users browsing this forum: No registered users and 1 guest

cron