if true stop x

Get help using Construct 2

Post » Mon Jan 23, 2012 12:57 am

im trying to make a command that will say if a shotgun is already spawned, dont spawn another one.

i guess i would do that with compare variable? shotgun.count = 1, but after that im not sure how to do it :(

thanks everyone
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Mon Jan 23, 2012 12:58 am

B
6
G
1
Posts: 44
Reputation: 1,220

Post » Mon Jan 23, 2012 12:34 pm

Create a boolean instancevariable in the object Shotgun with the defaul state of false - maybe you want to call it "spawned". Then after the "first" spawn set it to TRUE. Befor you spawn another one, check the variable and only spawn again if false....
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Mon Jan 23, 2012 2:43 pm

ok i will try that ty
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Mon Jan 23, 2012 5:38 pm

I answered here.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793


Return to How do I....?

Who is online

Users browsing this forum: fredriksthlm, MPPlantOfficial, Yahoo [Bot] and 18 guests