event.sprite table issue

Hello!

I have a tricky problem, a challenge for the pro’s here:

I have a table that holds the handles to my LaserBeam sprites :slight_smile: As elements of this table, these laserbeams all have handles like LaserBeam[1], LaserBeam[2] etc… Now, whenever one of these laserbeams ends its animation, it sends a sprite event named “end”.

The listener for this sprite event can call event.sprite to say which sprite sent out this event. The problem is, apparently all I get is a table number when I do this - probably the table number of table LaserBeam.

Is there any way to get to know the very specific LaserBeam, and not just the table?

Thx,
Thomas [import]uid: 70134 topic_id: 17205 reply_id: 317205[/import]

What is this in aid of?

You could add a .name property to the lasers to return the actual name you set.

Peach :slight_smile: [import]uid: 52491 topic_id: 17205 reply_id: 64940[/import]