Prevent More Objects to be Created...

Get help using Construct 2

Post » Sun Apr 05, 2015 12:26 pm

Hello!

This is my first question since I've signer up to Scirra so, here it goes...

I'm creating a top down zombie survival game and I introduced a mechanic that, after you get "bitten" by the zombie, a "cure" sprite is randomly created on the game.
My question is: How to I prevent another "cure" to be created while the first one is still on the scene?
Here's my line:
Image

Thank you in advance to anyone who reply to my question

Cheers
3rdclover
B
6
S
1
Posts: 18
Reputation: 343

Post » Sun Apr 05, 2015 12:48 pm

cure.pickedcount = 0
zombie on collision with player: create cure
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sun Apr 05, 2015 12:51 pm

many ways, but a subcondition of your colission event,| system compare cure.count < 1 | create cure
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177

Post » Sun Apr 05, 2015 1:51 pm

I'm sorry for not mentioning this before but I just started to work with construct 2 so, although I appreciate all your valuable input, I'm too much of a noob to keep up with it.

Do I have to create a global variable to the amount of cures i have on the scene?


Thank you
B
6
S
1
Posts: 18
Reputation: 343

Post » Sun Apr 05, 2015 2:15 pm

add the condition to your event 8:
system -> compare two values: cure.count = 0
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sun Apr 05, 2015 2:32 pm

Hi worked! Thank you all for the help!


--
B
6
S
1
Posts: 18
Reputation: 343


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests