:: PlayerAdvance.org ::

:: PlayerAdvance.org :: (http://www.playeradvance.org/forum/index.php)
-   Aide au développement (http://www.playeradvance.org/forum/forumdisplay.php?f=185)
-   -   PSP Résolu Image overlayer collision (http://www.playeradvance.org/forum/showthread.php?t=26727)

Pro X 03/08/2008 18h09

Image overlayer collision
 
Hi it's me again :D

I'm finished my game to 77% but now I have a little problem.
I've try to make a collision on two images the one is the enemy the second the hair cross. If the hair cross is one the enemy and the player press x they enemy are dead (simple plan i know^^) I try to make the code but it doesn't work.

here a little screen shot of my work

http://imgbox.de/users/public/images/a36159g73.png

http://imgbox.de/users/public/images/c5024c73.png

Thanks for any help bye the collision code
Greetz
PX

Dr.Vince 03/08/2008 18h26

hum.... if you know where you put your ennemies and there size, I don't understand where is your problem

Pro X 03/08/2008 22h21

Today is not my best day Dr.Vince :( so my problem is that that I didn't know how I can programm the code that he see when the hair cross is one the enemy.

Greetz
PX

Dr.Vince 03/08/2008 22h32

when he shoot, you take the coordinate of the cross

and you take all your ennemies visible and see if the coordinate match (if the ennemy sprite is at 20,40 and is 40x40 you watch if the cross is between 20,40 and 60,80 ( x between 20 and 60 and the y between 40 and 80)

Pro X 09/08/2008 19h47

Hi again
Sry I'm a bit late^^.
The problem is resolved. Yeah the one day is not my best day i know but know i't works and I released it in a few days (possible tomorrow^^).

Thanks for your help Dr.Vince

Greetz
PX


Fuseau horaire GMT +2. Il est actuellement 16h40.

Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd. Tous droits réservés.
Version française #16 par l'association vBulletin francophone