how do i Count Each Sprite with a certain animation?

Get help using Construct 2

Post » Fri May 08, 2015 11:19 pm

Hi! i wonder how do i count a sprite with a specific animation, for example:

for every Sprite playing "X" animation, add 100 to "X variable"
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Fri May 08, 2015 11:31 pm

Doesn't it work to do it like this? Everytime that animation ends for every copy of that sprite 100 gets added to points. By making it a trigger the points will only be added once everytime the trigger is triggered :P

Image
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Fri May 08, 2015 11:49 pm

Trigger....
System Pick all Sprite
Sprite is animation"X" playing......................Add Sprite.PickedCount*100 to variable X
Image
B
63
S
23
G
7
Posts: 1,480
Reputation: 10,796

Post » Fri May 08, 2015 11:55 pm

@Korbaach, it works but its goes on an on, its creates a loop. there is a way just to make like 1 shot?


EDIT: i added "trigger once", it works now, thanks a lot guys!!
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338


Return to How do I....?

Who is online

Users browsing this forum: Apollo14, ivanski1983, KTML5 and 5 guests