How do I test if Object is on Layout?

1 favourites
  • 5 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hey guys,

    i was wondering if there is a possibility for testing if there is still a "Enemy" on the Layout.

    because "on screen" is not the same, if the layout is bigger than the screen itself.

    Or is there a other easy solution?

    I would like to skip the possibility with counting the enemys and making a variable.

    kind regards

  • There's a built in function to check if something is still in the layout.

    Add event -> Select enemy sprite -> Scroll to "Size & Position" (or search "outside layout") -> Select "Is outside layout"

  • You can go to system and Compare two Values like Enemy.Count <= 0 that if you want to make something happen if there is no enemy

    but if you want to know how much enemy are in layout just make a text and set the text to enemy.Count this will display the quantity of enemy on layout.

    [Object].Count - will count all the object that exist inside or outside the layout and will get it quantity as and int.

    hope this help ya Good Luck!

  • Hey guys,

    i was wondering if there is a possibility for testing if there is still a "Enemy" on the Layout.

    because "on screen" is not the same, if the layout is bigger than the screen itself.

    Or is there a other easy solution?

    I would like to skip the possibility with counting the enemys and making a variable.

    kind regards

    If you want to test if there is an enemy in the layout, you can try this:

    Enemy.Count = 0

    or if you are targeting a specific object using UID's then you can use the System Condition:

    System --> Object UID exists.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can go to system and Compare two Values like Enemy.Count <= 0 that if you want to make something happen if there is no enemy

    but if you want to know how much enemy are in layout just make a text and set the text to enemy.Count this will display the quantity of enemy on layout.

    [Object].Count - will count all the object that exist inside or outside the layout and will get it quantity as and int.

    hope this help ya Good Luck!

    Thank you guys, it worked

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)