Detect if the objects are not existed

Get help using Construct 2

Post » Sun Apr 01, 2012 4:09 pm

Hi~
I encountered a question and no idea how to solve it~
I have several objects, I name it A,B,C,D,E for example~
What I need is if those A,B,C,D,E objects are not existed anymore~
Then mission complete, reset the level~

The question is, how do I detect the condition~
I found out that there has a "Is on-screen" condition~
But how do I make it become "Is not on-screen"?
Or there have other ways to do this actually?

In addition, how to reset level?
As my guess, I think is reload the layout?

Hope someone can help~
Thanks~
B
13
S
5
G
3
Posts: 63
Reputation: 3,989

Post » Sun Apr 01, 2012 4:21 pm

A.count = 0
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Apr 01, 2012 4:25 pm

Right click on a condition and select "Invert".

And your guess is right about reseting a level, paying also attention to the global variables/instances that you might have at play too.
Topic on the subjectKyatric2012-04-01 16:26:57
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Apr 01, 2012 5:01 pm

Thanks you Yann~
Ya, I have think about that object count = 0 too~
But I don't know how to set it, still learning~ ><

And thanks you Kyatric~
I see, we can invert the event by just checking the right click options~
I didn't know that at all, now I know how to write "!"(Not), cool~

I will check out the topic~
Arigatou~ ^_^
B
13
S
5
G
3
Posts: 63
Reputation: 3,989

Post » Sun Apr 01, 2012 5:24 pm

Create a System>Compare two values event, double click on the object you want to check for, and double click on Count.

To reset the level, create a System>Go to Layout (By name) event, double click System, and double click LayoutName.
B
25
S
8
G
8
Posts: 71
Reputation: 5,307

Post » Sun Apr 01, 2012 5:37 pm

perhaps that way way with global countervars (commented capx)
or a shorter possibility with the instant Count expression Joe72012-04-01 18:03:36
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Sun Apr 01, 2012 6:14 pm

Thanks for Zephlon's guide & Joe7's example files~
I will keep researching this tomorrow~
Because~ My time here now is already midnight 1AM~ ><
Thanks you everyone~ I got to sleep~ good night~ =)
B
13
S
5
G
3
Posts: 63
Reputation: 3,989


Return to How do I....?

Who is online

Users browsing this forum: Rezzon71, tarek2 and 24 guests