How do I catch the new layout loaded event?

Get help using Construct 2

Post » Sun Nov 23, 2014 2:13 pm

Hello guys,

I am trying to find a way to catch the layoutloaded kind of an event for the new layouts that I am loading in game for different levels.

I need to check some global variables on every new layout load.

How can I do that? I already tried 'on start of layout' system event but got nothing from that.

Cheers
B
11
S
3
Posts: 44
Reputation: 823

Post » Sun Nov 23, 2014 3:21 pm

Ok let me make it more clear.

I need to check a parameter on every layout load. What I have is only for the first load of the game it self but not for the successfull load after ''Go to layout' function called.

I need to find a way to check the variable on every new level layout load complete to set some objects or remove them depending on the parameter which can be set on the previous layout.

I am not sure if this is more clear but this is exactly what I need to do :)

Cheers
B
11
S
3
Posts: 44
Reputation: 823

Post » Sun Nov 23, 2014 5:38 pm

Hi @cantek would the "On start of layout" event not do what you need?
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Sun Nov 23, 2014 5:47 pm

Hi,

Yea it did not give me what I need as I mentioned in my first post. It is being triggered only once in the game load. Then on the layout changes which are done by Go To Layout function does not enter in that function.

Thanks

Cheers
B
11
S
3
Posts: 44
Reputation: 823

Post » Sun Nov 23, 2014 5:51 pm

On start of layout should work when you change your layout, it is its use, check no conditions are added to it that would prevent it from working.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Dec 29, 2014 3:22 pm

Ah, yea. I checked my conditions line by line at the end and there was one function taking effect before I try to get the params and it was setting them to default. So yea actually on start of layout works if you do not reset your values earlier :) Thanks guys.
B
11
S
3
Posts: 44
Reputation: 823


Return to How do I....?

Who is online

Users browsing this forum: beohs, divsyntax, tunepunk, Yahoo [Bot] and 8 guests