How do I check if an object is not existing on the layout?

Get help using Construct 2

Post » Mon Aug 22, 2016 8:49 am

Hi everyone,

I'm looking for the cleanest way to trigger actions if a given object is currently not existing on the layout. I don't know any existing conditions to check that, so what I generally do is:

(If I know there is no invisibility going on)
- Object is visible > (no actions)
- ELSE > (whatever actions I want to do)

I also sometimes do it with "is on screen", but it's not clean. If the object is on the layout but outside of the screen boundaries and invisible, it will not work.

Am I missing a simple action to check that, or is it a cleaner way to do it?

Thanks! :)
B
32
S
6
G
1
Posts: 353
Reputation: 2,814

Post » Mon Aug 22, 2016 9:26 am

Object.count should return 0 if you don't have any object on the layout.
Image Image
B
25
S
14
G
137
Posts: 876
Reputation: 71,510

Post » Mon Aug 22, 2016 9:40 am

Awesome, exactly what I was looking for! Never thought about using this. Thanks a lot! :)
B
32
S
6
G
1
Posts: 353
Reputation: 2,814


Return to How do I....?

Who is online

Users browsing this forum: badmoodtaylor, Yahoo [Bot] and 24 guests