0 Favourites

How do I enable and disable a bullet based on instances

  • 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

  • Is this what you were looking for?

    You have to pick the cube the matches the variable condition you are checking.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
0 Favourites
[Plugin] instance bank2
85 18,369
rexrainbow's avatar
rexrainbow
Unread hot topic
56 4,734
MPPlantOfficial's avatar
MPPlantOfficial