How Do You Change Layout Based On A Condition

Get help using Construct 2

Post » Thu Nov 07, 2013 3:58 am

Hi Everyone!

This is my very first post here and I am super excited that I hit my first roadblock. Essentially I want change the layout of my game based on certain condition.

I am pretty sure that i have the right idea with my event sheet All I want to do is change the layout based on a specific condition. If the player destroys the bridge they will fall down outside the bounds of the layout, and when this happens I want to go to the secret level.

So If the bridge tile is not on screen and the player falls through the layout bounds, I want to go to the secret level.

If anyone could help out that would mighty kind of you
HeroicSoftware2013-11-07 04:15:31
B
6
Posts: 9
Reputation: 291

Post » Thu Nov 07, 2013 4:04 am

Condition:
-Player is outside layout
Action:
-Go to layout

is that what you want?
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Thu Nov 07, 2013 4:06 am

Not necessarily, I need to change the layout only if the tile is missing. I would post a image of my event sheet Scirra isn't letting me.
B
6
Posts: 9
Reputation: 291

Post » Thu Nov 07, 2013 4:21 am

How about this?

You can add a global variable "tileDestroyed=0".
So when the tile is destroyed, set "tileDestroyed to 1"

So...

Condition:
-Player is outside layout
&&
-tileDestroyed = 1
Action:
-Go to layout
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Thu Nov 07, 2013 5:07 am

How would that look in an event sheet?
B
6
Posts: 9
Reputation: 291

Post » Thu Nov 07, 2013 6:04 am

https://www.dropbox.com/s/jzxscqh3hlfxdor/HeroicSoftware_secret.capx
B
17
S
8
G
4
Posts: 93
Reputation: 3,190

Post » Thu Nov 07, 2013 3:34 pm

Still not quite, I need to make sure if the player falls through the layout (Player.Y > LayoutHeight) and the tile is destroyed then go the secret level, otherwise if the player falls through the map i just restart the layout.
B
6
Posts: 9
Reputation: 291

Post » Thu Nov 07, 2013 3:41 pm

Thanks for all of your help by the way.
B
6
Posts: 9
Reputation: 291


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 6 guests