Problem with spawners

0 favourites
  • 7 posts
  • Im having a bit of trouble with my spawners, I have 2 spawners on the "HUD" layer just outside the visible field ingame, so they move when the player moves. Every two seconds they spawn an npc that walks left or right depending on where it spawned, my problem is if I move they spawn location doesnt move, the npcs are spawned on the original position of the spawners instead of where they currently are, any tips on how I fix this?

  • Instead of making them spawn on the original position of the spawners, make them spawn on the current position of the spawners.

  • Hm, I decided after some fiddling that it was better to have spawn points placed around the map, I have it spawn npc's every 1 second if a random variable = 1, otherwise not. When npc's are offscreen they are destroyed.

    I'm still struggling with having the game check where things are, I need to fix a zone where the spawn rule applies but I just can't figure it out. I feel like it's super easy to do, I'm just not seeing it...

    And, I can't figure out how to check for current position either...

  • Consider posting your project's capx, as it is, it is simply a guessing game.

    Explain clear steps to reproduce the issue you are encountering and in what event sheet it is happening.

    Explain what you would expect your event sheet to do, what you experience it doing instead.

    With those informations, it will be easier to answer accurately your question about your project you are currently the only one knowing.

  • Aye, I'll do that in the future if I can't get things running despite tips and advice. I finaly managed to get spawners to work, my issue was that I didn't understand I needed multiple checks to solve the problem.

  • Using the anchor behaviour on your spawners should do the trick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anchor, good tip!

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