Destroy multiple objects at once of one instance

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi. I'm new to Construct 2. I'm using the free edition. I'm making a top down game. Here is my problem: I have an enemy, a snowboard, and a snowboard print object. The enemy is riding on top of the snowboard. I wanted the snowboard to only go down vertical. So the snowboard must not move in any other direction. When the enemy crash into a tree or rock, I want to destroy the enemy, snowboard, and snowboard print. However, when I run the game, when the enemy crash the tree or rock, all enemies, snowboard prints, and some(not all for some reason) snowboards are destroyed. How do I only destroy the enemy, snowboard, and snowboard print that crash the tree or rock? Here is the capx file. dropbox.com/sh/a1dslqya9h42gy0/Ywg-eIHrtV Use WASD or the mouse to move around. The player do not shoot. Just move around.

  • Make the enemy, snowboard and snowboard print all part of a container.

    Container manual entry

    When one object of a container is destroyed, all other objects in the container are destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, theubie. It works now. How do I make the arrows destroy the enemy if it hits them after they shoot? When they shoot, I already made the arrow able to bounce off rocks. So when the arrow bounces off and it hits a enemy, the enemy is destroy. However, every time the enemies shoot, they automatically get destroy.

  • Sounds like the arrow is spawned on top of the enemy.

    Either set the enemies immune during the shooting (disable collisions, wait 1, enable collisions) or have the arrow object created outside of the enemy hitbox.

    You could also make the hitbox for the enemy bend around where you spawn the arrow as well, but that might be weird.

  • Thanks, Thndr. It's working now.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)