"on loading finished" or "on end of layout"

Get help using Construct 2

Post » Fri Aug 24, 2012 4:09 pm

Hi Guys, which of these should be used to do stuff before the game loads? What is the difference between them? I.e. when would one use:
1) on start of layout
2) on end of layout
3) on loading finished?

E.g. If I want to grab the screen size and change the window size, should this be done on loading finished,at start of layout or end of layout, or does it not matter?
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Fri Aug 24, 2012 4:15 pm

From my own experience

Start of layout - Code that is entered before the game loads on screen

On end of layout - Code that is run as the layout is ending and loading another layout or re-starting of layout

On loading finished - Code that runs when sprites etc have all loaded.

I'd guess the screen size and window size would be modified on Start of Layout.
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Thu Jan 17, 2013 8:00 am

@Richard Stennett - Will code actions that are told to run On Loading Finished ever run again? Or is that the only time they will be processed for the duration of program?

For instances, at the start I want a random number to be generated and stored to a variable, but I don't want that action to occur repeatedly every tick - just at the start-up. Is that how On Loading Finished works?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
113
S
20
G
8
Posts: 741
Reputation: 13,661

Post » Thu Jan 17, 2013 8:33 am

these 3 events are triggers,

On start layout is useful to setup some actions like transitions, ready set go, etc..

On end of layout, is useful to stop music and sound, etc. if you go to another layout.

On loading finished, if you use layout preloader, when the loading is complete, you should make it go to another layout to begin the game.Joannesalfa2013-01-17 08:33:41
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,646

Post » Thu Jan 17, 2013 1:03 pm

See how to use loader layouts to make custom loading screens

'On start of layout' and 'On end of layout' trigger at the beginning and end of every layout.

'On loading finishes' only ever triggers on a loader layout, when the project has finished downloading and the game can begin.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests