pressing the key

blursea
08-08-2001, 05:12 PM
when i press the right key the image goes left and the player is always set at the center of the image like in mario game,
i maked when there are a collision detection between the player and the box in front of him the player stop, but i have one problem:the image continue when i'm pressing the right key,so i want when the player stops, the image doesn't move

Squirm
08-08-2001, 05:50 PM
It is beginning to sound like you are approaching the problem wrongly. Rather than moving pictures around as you go, you should be updating variables related to character position, then draw the scene around those variables. Each game 'loop' you should update the player's info. in variables. From that, decide what you need to draw and where. It is the most efficient, and fastest method of doing things.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum