Spwaning problems

This forum is currently in read-only mode.
  • Hi,

    I don't know if it is a bug or if i just missed something. When i try to to spawn a object(a sprite) in multiple places at the same time, it does not work properly. I try to spawn an enemy sprite several times.

    Several issues can happen:

    1) i can't spawn a object more than one time if i use the same spawn point which is copy and pasted or cloned. If i do so, only one of this spawn points will spawn the object.

    2) if i use completely different spawn points i can spawn the object several times but only one of this sprites will act correctly. Only one of the enemy sprites will chase the player and act like it is set in the event sheets. The others will just do randomly nothing or only a part of the event script.

    3) if i assign a light source to the enemy sprite, it will be only set to the first spawned sprite, never to the others. I tried containers, but if use containers construct crashes when i start the application.

    My Cap:


    Is this a bug? I think crashing to the desktop is no good sign^^ Or are my events messed up?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you haven't checked it, I suggest parts 8 and 9 of the Platform School Tutorial on the wiki page. They deal with enemies and enemy AI, and if you didn't look at that, that can be a great help. It offers essentially a foolproof way of setting up enemies and enemy spawn points.

    Just looking at things briefly, a major problem is that your events for your spawn points are set up that only ONE spawn point will actually do anything.

    What you need is the condition "For Each Spwan" [sic]

    Because the way you have it now, only ONE spawn point will activate and destroy itself, leaving the rest to just kinda sit there.

    Also, nowhere on your layout does the enemy actually, you know, exist. What you want to do, is put instances of your enemy outside the layout, with the Group attribute "Destroy on Startup"

    Then you can probably put the enemy and the light object in the same container. Because your enemies just... aren't there.

    Really, like I said, check out the tutorial. You may not be making a platformer, but I would highly recommend seeing how the tutorial does it, and learning from that. A lot of what is causing crashes for you is in fact just simple errors.

  • Thanks emporer!

    Oh, i did the tutorials but i skipped the ai section of the platform tutorial

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)