Groups of enemy shooting a target

Hi all!

Currently I have a problem with groups of enemy shooting a target. Each group contains two separated objects, which are the body and the weapon. The enemies can be spawned correctly with the weapon. But when I created bullet for each weapon, somehow, the bullet only appear for the first enemy spawned. The next enemies cannot shoot any bullets.

The only way I could think of right now, is to make multiple groups of enemy, and multiple events for each group. But I think that workaround could slows down the performance, someone correct me if I’m wrong.
So… is there any way, to make all of the spawned enemies can shoot the target without making too many groups?

I provided a test project below, to make the problem easier to understand.
As you can see if you open the file, only the first enemy can shoot the target. (10.1 KB)

Instead of normal event for spawning bullet use for each object event. Look at shootingBulletExplenation example that comes with gdevelop.

Awesoome…! :smiley: After playing a bit with it, now I’ve got it working!
Actually, I opened that example a few times before. But I missed that important part. I thought that “For each object” text was some kind of comment. :blush: heheh…
Thanks again for the help, Pleox! That was fast.

You will quickly find out that GDevelop’s community is welcoming and awesome! Take care and make awesome games!

Thanks Darkhog! :slight_smile: My game is progressing fairly well so far.
Indeed, this community is one of the best I can find. Many communities turn out a bit ugly once flooded by too many members though. I hope this one will stay awesome even when the members increasing so much in the future.