How do I create different individuals from one object

Get help using Construct 2

Post » Thu Mar 06, 2014 4:01 pm

Hello,
I have the following problem that I would like to solve:
I want to make a zombie shooter and I've created two characters: the survivor and the zombie.
Now if I want to let the zombie spawn every 2-5 seconds (so I can kill him), all outside influences affect to all of the spawned zombies.
This means: I kill a zombie - Are all killed. :(
How can I solve this problem?
Greetings from Germany! ;)
B
2
Posts: 4
Reputation: 158

Post » Fri Mar 07, 2014 10:58 pm

Do what I tell you:
1- add instance variable "outsidelayout" and set it to 1, then add condition: "Zombie is outside layout" ==> action: "Set zombie outsidelayout to 0"
2- Condition: "if zombie outsidelayout is equal to 0" ==> action "Zombie destroy"
Hope it helps!
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,446

Post » Sat Mar 08, 2014 12:02 am

Hi dudelino,

1. You can find a lot of basic information like this in the manual. Pls check it first next time.

2. If you have a problem you should be more precise and add a capx file showing the problem.

3. To the problem:

a. If you wanna kill an enemy that is outside the layout: there is a behavior for that (easiest way)

b. If you wanna kill an enemie by player you should do this via collision detection.

- Player spawns bullet => bullet on collision with enemie => destroy enemie and bullet

Other bullets or enemies will not be affected.

Cheers,
Marco
B
34
S
9
G
3
Posts: 206
Reputation: 7,851


Return to How do I....?

Who is online

Users browsing this forum: wittlewobber, worm1 and 21 guests