How do I check if no instances of an object are on screen?

Get help using Construct 2

Post » Tue Jan 24, 2017 12:29 am

Could someone tell me how to check if all instances of an object are not on screen?

Thanks
B
5
S
2
Posts: 3
Reputation: 431

Post » Tue Jan 24, 2017 1:19 am

If you need to keep track of the number of objects :

System pick all Object1
--- Object1 is on screen > Set Global Var to Object1.PickedCount

Now Global Var is the number of Object1 on screen. Whenever Global Var is 0 then none of them are on screen.

If you don't need to keep track of the number of objects :

Object1 is on screen > Set a variable to true
else
Set false

This would mean whenever any Object1 is on screen then the variable would set to true, if set to false then this means no Object1 are on screen.
B
46
S
16
G
78
Posts: 2,170
Reputation: 46,357

Post » Tue Jan 24, 2017 8:36 am

Sprite is on screen
Else
.................actions
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Jan 29, 2017 4:40 pm

Thanks
B
5
S
2
Posts: 3
Reputation: 431


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 38 guests