How do I enable and disable a bullet based on instances

Get help using Construct 2

Post » Sat Jan 31, 2015 9:33 pm

I have 2 blocks. If you click on either block it becomes a "Wall" (Sets an instance variable to 1). Bullets are fired at these walls. When they collide they test if the "Wall" variable is on.

Single click a cube: Wall Variable set to 1 = bullet is disabled
Double click the cube: Wall Variable set to 0 = bullet is enabled

Here is the problem.: First click one wall to set the variable to 1 (will change color to verify it happened). Watch the bullets become disabled when they contact that wall. Now double click the wall, the Bullets do not re-enable. They stay still.

I tired setting an "is overlapping" condition where if a bullet was overlapping a Wall variable that was = 0 then it would re-enable, but that ends up affecting all the instances. So if one cube had that condition as true then it would force all the bullets to respect it.

How can I tell the bullets that are disabled that when they are overlapping a cube that no longer has a Wall variable of 1 they can continue moving again? Hopeful that makes sense..?.?.? I Attached my capX
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 28
Reputation: 554

Post » Sat Jan 31, 2015 11:01 pm

Is this what you were looking for?

You have to pick the cube the matches the variable condition you are checking.
You do not have the required permissions to view the files attached to this post.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sat Jan 31, 2015 11:35 pm

Hey! That looks like it's just what I needed. I'll have to research the "Pick" options more diligently, Thanks for the response! This should work great once I place it back into my full game code.
B
6
S
1
Posts: 28
Reputation: 554


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests