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
3
S
1
Posts: 2
Reputation: 279

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
45
S
15
G
73
Posts: 2,000
Reputation: 43,382

Post » Tue Jan 24, 2017 8:36 am

Sprite is on screen
Else
.................actions
B
33
S
18
G
27
Posts: 2,431
Reputation: 20,326

Post » Sun Jan 29, 2017 4:40 pm

Thanks
B
3
S
1
Posts: 2
Reputation: 279


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 3 guests