How do I count instance that plays a certain animation

Get help using Construct 2

Post » Fri Aug 07, 2015 9:08 pm

Hi!
I have a bunch of blocks that spawns and is given a random animation once created. Is there anyway for me to count the instances that play a certain animation? Like "Object.count" & animation is playing?

Or, if its possible to count the number of objects with a certain instance variable? Thanks.
B
11
S
4
G
2
Posts: 116
Reputation: 1,936

Post » Fri Aug 07, 2015 9:54 pm

I found out another way of doing what I was trying to do. But still wonder if there is some command to do the above?
B
11
S
4
G
2
Posts: 116
Reputation: 1,936

Post » Fri Aug 07, 2015 11:25 pm

@DetteMan

easiest way is to create an event for your object (blocks or whatever), use "Is playing animation" (and give it the name of the animation you want),
then add an action to set a variable or display in a text box: objectname.PickedCount
B
99
S
35
G
20
Posts: 438
Reputation: 17,910

Post » Sat Aug 08, 2015 2:39 pm

Thanks @AllanR
That's what I ended up doing. Just thought if there was an expression that I didn't know of.
B
11
S
4
G
2
Posts: 116
Reputation: 1,936


Return to How do I....?

Who is online

Users browsing this forum: max2612, Zzarkz and 22 guests