Destroy multiple objects at once of one instance

Get help using Construct 2

Post » Fri Feb 22, 2013 11:43 pm

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. https://www.dropbox.com/sh/a1dslqya9h42gy0/Ywg-eIHrtV Use WASD or the mouse to move around. The player do not shoot. Just move around.
B
3
Posts: 18
Reputation: 311

Post » Sat Feb 23, 2013 12:17 am

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.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Sat Feb 23, 2013 1:42 am

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.
B
3
Posts: 18
Reputation: 311

Post » Sat Feb 23, 2013 2:40 am

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.
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Sat Feb 23, 2013 4:28 am

Thanks, Thndr. It's working now.
B
3
Posts: 18
Reputation: 311


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests