pick a random spawner instance

0 favourites
  • 3 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hi

    I recently downloaded a book called Level 0, in there there is a bubble pop game and a plane under attack game among others, I have followed the instructions all the way in the book for both the plane and the bubble game but the bubbles and the missiles in the plane game are all coming from one side. an anyone advise what is wrong and what to do i am fairly new in game making and was every happy when i downloaded this book. I found Construct 2 to be very easy but i cannot find a solution for this problem.

    this is what it says in the book for the bubbles.

    "Great! Now click on the Event Sheet and create a new event. This event will be a system “Every X seconds condition.” Set it to create bubbles at the target location every 1 second.

    Next add another system action. This time create a bubble at the spawner’s X and Y coordinates. An object’s X and Y coordinates correspond to its location in relation to the top left corner of the screen as measured in pixels. So, an object whose X and Y is 100 X 100 is 100 pixels to the right of the left side of the screen, and 100 pixels down from the top.

    The game is doing exactly what you told it to do. You may be wondering whyit is only spawning through one spawner instead of all of them. Turns out you didn’t give Construct 2 a specific enough routine to run. This time, add some randomness to it and hide your spawners.

    You can add more than one condition to an event. Click on the event and right click it to add another condition.

    Select the system event and click on “pick random instance.” An instance is a

    variation — or copy — of an object that is on the screen. Each of your spawners

    is an instance of the original spawner. You duplicated it four times, and each of

    those sprites is an individual instance.

    You will be picking a random instance every 1 second. This will spawn a bubble

    randomly and have it float to the top of the screen."

    this does not solve the problem of the bubbles all coming from one side. I did exactly how the book says. Same goes for the missiles in a project further down in the book.PLEASE HELP

  • It would be easier if you put your capx in a drobox or other media share site and posted a link to it for us to see where you have erred.

    If your rank isn't high enough for links you can still post them by putting spaces in them.

    My guess though is that your bullet behavior and/or bullet actions them self are to blame.. and it doesn't sound like your spawning at the target either.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your response, I got it solved, The author said to duplicate the spawners. I was actually cloning them which i thought was what he meant. But you have to copy the first spawner and paste it then you have one spawner. I had cloned several.now it works.

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