Number of instances

Discussion and feedback on Construct 2

Post » Mon Dec 26, 2011 3:32 pm

How can I know how many instances of a object I have? I need to create a for each loop to count or C2 has a faster and clean way ?
Thanks in advance
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Mon Dec 26, 2011 3:57 pm

One of the Misc event expressions available is Count which counts the number of instances of an object.

zenox982011-12-26 15:59:16
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,839
Reputation: 48,279

Post » Mon Dec 26, 2011 4:51 pm

Wow thanks a lot exactly that I was needing... Sorry about this question but I really not found this...
Btw, I used For..Each loop with a local variable to count.. but its slower than using Count.
Thanks!
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885


Return to Construct 2 General

Who is online

Users browsing this forum: shinichild, veeru5656 and 10 guests