Random Spawning Objects.. how to.. LIMITS?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hey ppl!

    I'm making an addicting game like a tower defense, but I have a problem, I know how to spawn objects randomly but a lot of times these objects appears at the "Core" of the game, the "Core" is what you defend, and ofc the objects can't appear at the "Core"..

    Don't know if you know what I mean :(

  • You need to set the position for the newly spawned object.

    To make it simple; instead of using the spawn function, use the Create object function

    (Action: System -> General).

    These two functions do the same thing, but with the "Create Object" action you can set position and layer to where the object should be created.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I would do is have solid sprites in areas where the objects can not spawn, and have a 'spawner' sprite that changes its position randomly. Then have a condition that says that if the spawner sprite is not overlapping the solid sprite, then create object.

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