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: 167
Reputation: 4,887

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
122
S
29
G
70
Posts: 4,907
Reputation: 49,500

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: 167
Reputation: 4,887


Return to Construct 2 General

Who is online

Users browsing this forum: megga, mindragon73, Psychokiller1888 and 13 guests