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
44
S
23
G
13
Posts: 723
Reputation: 14,925

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
289
S
112
G
94
Posts: 7,333
Reputation: 69,293


Return to How do I....?

Who is online

Users browsing this forum: Matei511 and 71 guests