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
S
1
G
1
Posts: 44
Reputation: 1,370

Post » Mon Jan 23, 2012 12:58 am

B
6
S
1
G
1
Posts: 44
Reputation: 1,370

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
43
S
20
G
13
Posts: 723
Reputation: 14,635

Post » Mon Jan 23, 2012 2:43 pm

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

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
267
S
95
G
66
Posts: 7,210
Reputation: 73,086


Return to How do I....?

Who is online

Users browsing this forum: NN81, Zjahel0001 and 10 guests