How do I spawn enemies randomly and keep health bars

Hi so I’m making a military combat game and I’m trying to make a my enemies spawn from multiple spawn zones, and have health bars. I tried using the “spawn” extension but I couldn’t make each enemy have a health bar. So I tried to use the “create” command but my problem with that was I couldn’t make them spawn at random times. I’m switching from Construct so It might just be that I’m new. Thank you for the help!

Here is another screen shot to make more sense.

And here you have whole project including it i mean on my itch

@ZeroX4 Thank you for the help and I will definitely check this out. Like I said I’m pretty new and still used to Constructs system.

1 Like

I don’t think using the spawning extension is right in this case because you want to spawn 2 objects and spawn them.

Instead, consider using an object timer on the Enemy_Spawner object and an object variable on it to hold the spawn time. This would allow the flexibility to have spawners with different spawning times.

Here’s an example, in which I’ve added the object variable “SpawnTime” to the Enemy_Spawner object and set it in the scene editor to the number of seconds between each spawning event:

Note - I’ve used the “Repeat for each instance of Enemy_Spawner” in case there are multiple Enemy_Spawner objects that trigger at the same time.

Thank you so much. This personally makes more sense than the extension. I can see why you would use the extension seeing that it’s fairly easy to set up. But I find it annoying that it has so many limitations, and a fair comparison from Construct to Gdevelop is that it had a “wait for X amount of time” Condition instead of having to start and stop a timer. So again ty for the help.