If you're making something like a zombie survival game or just want random objects to spawn, you would find that making objects spawn randomly is a bit of a pickle.
But it's actually very simple, and can be applied to most games.
Firstly, in your layout, make a blank sprite, this is your spawner object. It can be what ever size you want. A player, and one instance of the object you are spawning (can be outside layout). Like so:
Open full size image Now go to your event editor and try the following (The variable is for debug purposes, you can add it if you want):
Open full size image
Every one second (this can be changed to any value, or even a random value ie. random 1-5, which will spawn at any time between 1 and 5 seconds) it will change the position of the spawner object to a random value on the map.
If the spawner object is not on screen it will spawn an object next to it and if it is on screen it will move again and try spawn something)
That's basically it!
If you are spawning zombies, you could make it that when they are created they move toward the player.
If there is anything I missed, feel free to drop a comment.
Unlock your full gamedev potential
Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!
Plus, it's got a lot of additional features that will help you save time and make more impressive games!