The Daily Click ::. Forums ::. General Chat ::. Bounce on head mario engine
 

Post Reply  Post Oekaki 
 

Posted By Message

Maddie



Registered
  13/03/2003
Points
  274
29th June, 2003 at 12:32:19 -

does anyone have one thats really good and open source with bouncing on heads and stuff. (one like nanobiz)

and also with the aimer if thats possible I have no idea to get started like that. that game continues to amaze meh.

thx !

 
-Maddie-

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
29th June, 2003 at 20:10:58 -

This is in the wrong forum.

There are two things you can do. The easiest, but rather inaccurate way of doing things, is to create a marker ontop of the enemies which, if the player collides with it, the enemy is destroyed.

The second way is to seperate your code into two collision events. In the first, add the condition that if the direction of the player is up or horizontal. If this is the case, then destroy the player (or flash and subtract a life). In the second, compare that the direction is down, and that the bottom position of the player is less than or equal to the top position of the enemy plus some error margin. The error margin needs to be used because when the collision event is fired, the player will already be overlapping the enemy. The actual number you should use depends on the size of your sprites.

I'm not sure what type of aimer your talking about, could you please explain in more detail?

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
   

Post Reply



 



Advertisement

Worth A Click