Layout value?

Get help using Construct 2

Post » Sun Jan 01, 2012 10:42 pm

Is there a value for Layout, so I can compare it?

Example: Making an event:
if current Layout equals "Layout 1", do this.

lonrot2012-01-01 22:48:28
B
4
G
1
Posts: 53
Reputation: 708

Post » Sun Jan 01, 2012 11:11 pm

There's a layoutname system variable
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Jan 01, 2012 11:58 pm

Can you tell me exactly how do I call it?
Where can I see the complete list of system variables?
B
4
G
1
Posts: 53
Reputation: 708

Post » Mon Jan 02, 2012 3:54 am

hey ionrot, there is a page in the fabulous manual explaining system expressions here: Manual--expressions

you would call it (assuming your layout is named layout1: "layout1.layoutname"

B
29
S
5
G
6
Posts: 58
Reputation: 5,121

Post » Mon Jan 02, 2012 4:27 am

I don't know what I'm doing wrong here. The idea is to load music once "Layout1" starts. But it's not working and the rest of tracks depend on this one.

lonrot2012-01-02 07:21:51
B
4
G
1
Posts: 53
Reputation: 708

Post » Mon Jan 02, 2012 1:46 pm

Once again it has to see with how events work

From what you show, every tick, a condition is checked to see if LayoutName is "Layout1". So every tick that this condition is true, the "loop-intro" is set to play (from start).
Try to put this event as a subevent of "Start of layout", this should only execute once.

Also by default the name of the layout is "Layout 1" (notice the space ?) not "Layout1". If you compare to a wrong value, it won't work.
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,786

Post » Mon Jan 02, 2012 7:08 pm

Thanks Kyatric, now is working properly. But there's a short pause between each track, and it sounds rather choppy, is there a way to fix this?



B
4
G
1
Posts: 53
Reputation: 708

Post » Mon Jan 02, 2012 8:22 pm

can you post a capx?
B
29
S
5
G
6
Posts: 58
Reputation: 5,121

Post » Mon Jan 02, 2012 8:26 pm

Audio support in browsers is bad atm.

If there is a pause, it's maybe due to a few seconds of silence at the beginning and end of your sound files, isn't it ?
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,786

Post » Tue Jan 03, 2012 12:15 am

Not at all Kyatric, I made them myself in audition with perfect splitting.

Here check the AUDIO FILES, I attached a sample playlist (with the same order as in the game).

Also here's the CAPX file.



lonrot2012-01-03 02:33:39
B
4
G
1
Posts: 53
Reputation: 708

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests