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
23
S
6
G
7
Posts: 167
Reputation: 5,232

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
145
S
33
G
89
Posts: 5,913
Reputation: 62,591

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
23
S
6
G
7
Posts: 167
Reputation: 5,232


Return to Construct 2 General

Who is online

Users browsing this forum: Anonnymitet and 1 guest