Movment

Game Editor comments and discussion.

Movment

Postby firerfun » Tue Aug 12, 2008 10:47 am

I need help.

im trying to make my charcter move in a specific way. the best example i can give would be like the people move in Pokemon or Zelda for GB. like where they move one square at a time. is there a way to do that (i assume there is). i have gone through the tutorials i could find and found nothing.

Thanks
firerfun
 
Posts: 14
Joined: Mon Nov 27, 2006 10:27 pm
Score: 0 Give a positive score

Re: Movment

Postby BlarghNRawr » Tue Aug 12, 2008 10:07 pm

i think u need an array but im not sure
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Movment

Postby feral » Wed Aug 13, 2008 4:22 am

an array would help, but if your "squares" are all the same size, which I assume, it should just be matter of adding the width/or height of the square to the players position each move..

eg: if your square are 32 pixels wide you should just be able to say
x=x+32
or y=y+32

[EDITED - sorry i put some silly code here -now removed.. if you read it please disregard]

you want to only move one space at a time, you will need to disable the repeat function on any of your key down events so you have to tap the key each time to move square

if this is not what you want let us know.
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron