In short enemy one shoot a bullet and enemy two shoot a bullet (the two of them are using the same bullet) so if I destroy enemy one I want any inst of the bullet to be destroy that was spawn by enemy one leaving enemy two bullet an screen.
Use an instance variable (ID) to identify the bullet (use enemy's UID). Then on enemy X dying, "Pick by comparison" where bullet.ID = enemyUID and destroy bullet.
Develop games in your browser. Powerful, performant & highly capable.
will it work if it is more that one bullet the enemy spawn?
Yes.
I try it an it work but not the way I wanted it to.
It only set the value of the first enemy that shot.
You'd have to post what you've done, for any specific help.
On bullet created set bullet number to enemy.uid
Also it 10 enemy at a time an the stage.
"On bullet created" is too late. When you create the bullet in the context of the current enemy, set it there.
oh wait now i understood your question,
nevermind i did a capx. but no famillys just made an extra enemybullet sprite maybe helps Download Capx