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
23
S
5
G
1
Posts: 335
Reputation: 2,406

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
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Mon Aug 22, 2016 9:40 am

Awesome, exactly what I was looking for! Never thought about using this. Thanks a lot! :)
B
23
S
5
G
1
Posts: 335
Reputation: 2,406


Return to How do I....?

Who is online

Users browsing this forum: Cubus32, tarek2 and 7 guests