How do I count number of object destroyed?

Get help using Construct 2

Post » Fri Aug 21, 2015 10:16 am

Hi everyone,

I have 30 - 40 objects on screen and I put all of them into a family. Every time 3 or more object from the family is destroyed, I want to add 5 to a global variable "time". Is there a way to calculate the number of objects destroyed?

I am currently using

Family On destroy & Family.Count>=3 : Add 5 to timer but it's not working as I wanted.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Fri Aug 21, 2015 11:24 am

make global variable (e.g. var1) with initial value 0.

Family On destroy : Add 1 to var1
var1 >= 3 : Add 5 to timer & Set var1 to 0
Lokkim Games: Constructor Dude - Fun platformer game, PuzCro - Difficult puzzle game demo
B
9
S
3
G
1
Posts: 38
Reputation: 795

Post » Fri Aug 21, 2015 11:28 am

I do not know what problem you are experiencing, but one detail that your logic would be reset your family 's accountant, I do not know if it's already doing it .
B
5
S
1
Posts: 15
Reputation: 493


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests