Identify an enemy in Bucle + Type (code provided)

Blitz3D Forums/Blitz3D Programming/Identify an enemy in Bucle + Type (code provided)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

i have the following code to create my enemies:

For cant=1 to 5
Enemy.Enemy=New Enemy
enemy\ex#=Rand(0,640) ; posicion X del enemigo
enemy\ey#=Rand(0,480) ; posicion Y del enemigo
enemy\espd#=.5 ; velocidad del enemigo
enemy\roamx=Rand(0,640) ; posicion 'x' para vagar (aleatoria entre 0 y 640)
enemy\roamy=Rand(0,480) ; posicion 'y' para vagar (aleatoria entre 0 y 480)
enemy\elife#=100 ; ahora el enemigo tiene vida, jojojo, estamos mas parejos
enemy\ebarX#=enemy\ex#
enemy\ebarY#=enemy\ey#

Next

i want to give a right click over an enemy and the enemy lose .5 points of life (whole life is 100). now, i cannt identify wich of the 5 enemies i am attacking :(

is posible to identify the enemy in the screen?

any ideas?