How does the move between layout??

Get help using Construct 2

Post » Mon Nov 03, 2014 7:55 pm

Hello Guys,

I am new in this and in less than a weeks I already have some levels in my puzzle game, now i am not able to move between levels.

I am going to explain it better, the levels finish when the player destroy some objects, at the first level i have only one object to be destroyed and then i want it to continue to the next level, but it is not happening.

I have tried the followings:
- Using every tick, like a sub event I put "the object is not on the screen" go to the next layout.
It is not working, but if i put "the object is on the screen", layout changes to the next one.

- I have also tried to use "Compare X" and "Compare Y" for indicate the object is in the screen, using this condition, when the object is in the screen, of course the layout moves to the next one, but i want the oposite condition, so i tried to invert this one, but i can't. I am pretty sure, there must be an easy way to do what i want to do.

There are more tries..., i am not going to tell here. I found one way but i don't like it because i need to use the UID, the way is make an event looking is the object with a specific UID exists and if it is not, move to the next layout. Anyway, I don't like this one because that implies i would have to look the UID in every level of my game.

I have another question, i miss the opton to introduce code, i think, the thing i am triying to do would be easier if i could put a simple if, saying something like, if not(there are like this one) in between (< x <) and (<y<): move to the next layout. So, the question is, is there a way to use code??

Well, I hope someone can help me.

Thanks in advance.
Posts: 4
Reputation: 183

Post » Mon Nov 03, 2014 8:39 pm

Have you tried checking the Count property of the objects you're destroying? If, say, you have an object called Object1, you could use "Compare two values" under the system object to check if Object1.count is equal to 0, meaning there are no more instances of Object1 left.

Ideally, though, it would be better if you provide a CAPX so that someone can look at what's going on. If you don't want to share your game code, you can strip your CAPX down to only parts that you're needing help with.
Posts: 1,586
Reputation: 19,116

Post » Mon Nov 03, 2014 8:56 pm

It won't be necessary!! Following your advice, using "Object.count == 0" my problem was solved!!!

Thank you so much, your advice was great!!

Thanks again,

Posts: 4
Reputation: 183

Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, unicornspitfire and 25 guests