Infected on collision

Get help using Construct 2

Post » Wed May 29, 2013 9:15 am

I have a question. Suppose Im making a Zombie game. I have two Sprites: Zombie and Human.
At the start of the game there is 1 Zombie. There are many humans. When that Zombie collides with a Human, the Human becomes infected (a Zombie himself).
Now that Human that just became infected it can also infect Humans. How would I do this in Construct 2?
Ideally I would like to change the Sprite of Zombie to Human. In Construct 2 I cannot check for a collision between a Human (with infected = "true") and a Human (with infected = "false").

I have now achieved this by destroying the Human and spawning a Zombie, but this is not really pretty.

Thanks!
B
8
S
1
G
2
Posts: 13
Reputation: 1,510

Post » Wed May 29, 2013 6:51 pm

This should help; you'll be able to check for variables when Humans collide with each other after this tutorial.

https://www.scirra.com/tutorials/556/understanding-picking-with-respect-to-families
B
17
S
4
G
4
Posts: 143
Reputation: 4,004

Post » Thu May 30, 2013 8:07 am

That is exactly what I need. You are awesome!
B
8
S
1
G
2
Posts: 13
Reputation: 1,510

Post » Thu May 30, 2013 8:36 am

Here is an old demonstration where you can see the exact mechanic:

Evil spritesvee412013-05-30 08:37:11
B
24
S
9
G
7
Posts: 756
Reputation: 7,292

Post » Thu May 30, 2013 10:21 am

Thanks a lot for the example!
B
8
S
1
G
2
Posts: 13
Reputation: 1,510


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests