pick a random spawner instance

Get help using Construct 2

Post » Fri Feb 12, 2016 7:07 pm

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
B
7
S
1
G
1
Posts: 22
Reputation: 924

Post » Sat Feb 13, 2016 12:23 am

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.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 593
Reputation: 8,558

Post » Sat Feb 20, 2016 5:02 pm

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.
B
7
S
1
G
1
Posts: 22
Reputation: 924


Return to How do I....?

Who is online

Users browsing this forum: Greaver, tetuan and 4 guests