How do I recreate (spawn) clouds?

0 favourites
  • 4 posts
From the Asset Store
Create a boss fight with this easy to follow game pack. Recreate the classic attacks of Mutoid Man from Super Smash TV
  • Hi! I probably can't see the forest due to all the trees (german saying). In my platform game I want clouds to appear and move constantly to the right. I already positioned 8 clouds (copies of the first one) and after they've moved let's say 500 pixels a new cloud is meant to appear where the first one started. So I guess it has something to do with spawning, instances variables, creating objects, comparing X and the like. But I just don't know what to do. Unfortunately the beginner's guide didn't help...

    Thank you already!

    Screenshot of clouds:

    https://www.dropbox.com/s/x6a9cpcjg5agv ... s.png?dl=0

  • The easiest way would be to make a sprite object and clone it as many times as you need cloud spawners. Now place one of these "cloud spawner" cubes at each cloud spawn location. Then either use Every X seconds or Every X seconds with Random(0-#) as seconds to spawn clouds.

    On your cloud object itself use the bullet behavior to make it move right and a fade behavior and set the fade to begin when spawned via action and set the fade timer to be whatever lifespan you want for the clouds with a destroy action after the fade action.

    If your game doesn't scroll to right you could also put a rectangle sprite just off screen that is the height of the screen and use an On-overlapping this "cloud killer" condition on cloud to destroy clouds after they leave screen.

    Also if your game does scroll right you could put the scroll-to behavior on all your "cloud spawners" and adjust the offset so that they stay off screen behind the player/camera but follow along behind spawning their clouds.

  • Thank you!! But you need to copy it instead of cloning. I used this destroy sprite at the end of the layout and worked with sine behavior instead of bullet. Your ideas helped me a lot! In case you want to check the latest version: https://www.scirra.com/arcade/adventure ... 14457?cp=3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Excellent work, clouds seem to be spawning nicely too.

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