How do I Count Objects on screen?

Get help using Construct 2

Post » Wed Jul 20, 2016 1:40 pm

I want to make a event which makes the games perform and an action once a certain number of objects are on screen. (E.g After a 5 cards are dealt out/on screen move to dealing the next persons hand)

Thanks
B
5
S
1
Posts: 65
Reputation: 507

Post » Wed Jul 20, 2016 1:44 pm

If you mean instances of an Sprite, Sprite.count tells you that.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jul 20, 2016 1:54 pm

@99Instances2Go

I do not mean instances of the same sprite but just the total number of sprites on screen.
B
5
S
1
Posts: 65
Reputation: 507

Post » Wed Jul 20, 2016 2:00 pm

I think to figure out what's simply on screen is to add all sprites into a single family and check for family.count is on-screen conditions. You could also just add up each sprite.count of each sprite instance - whichever is easier.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Wed Jul 20, 2016 2:30 pm

@SoldjahBoy

Good Idea, Thanks.
B
5
S
1
Posts: 65
Reputation: 507

Post » Wed Jul 20, 2016 3:03 pm

No problem. Hope it works for you :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499


Return to How do I....?

Who is online

Users browsing this forum: plinkie, RIDETHEPIG and 7 guests