Layout value?

0 favourites
  • 13 posts
From the Asset Store
Check preview, download and add value to your games.
  • Is there a value for Layout, so I can compare it?

    Example: Making an event:

    if current Layout equals "Layout 1", do this.

    <img src="http://img854.imageshack.us/img854/6038/layoutname.png" border="0" />

  • There's a layoutname system variable

  • Can you tell me exactly how do I call it?

    Where can I see the complete list of system variables?

  • 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"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

    <img src="http://img24.imageshack.us/img24/5206/layoutnotworking.png" border="0" />

  • 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.

  • 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?

    <img src="http://img9.imageshack.us/img9/9571/correctlayout.png" border="0" />

  • can you post a capx?

  • 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 ?

  • 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.

  • hmm, i don't yet have the software to look at your audio files, but as far as I can see in construct 2, there is no way around your pause problem. perhaps it is a problem w/ c2 itself. iv'e already tried preloading the audio files and whatnot, but the pause is still there. as kyatric said, audio in html5 is a little...murky

    edit: i looked at your audio files, and they don't have a pause in them, so i assume it's construct

    btw, nice game <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Same observation here.

    Since you have basicly two music sounds : the intro, the looping piece, just make 2 files out of it instead of 4, gather loop intro and intro1 as one file, loop2 and 3 as another one, play the first file only once, chain with the second file and loop it.

    You might reduce the number of pauses.

  • Thanks ayzhong :)

    Kyatric I'll do what you suggest. A bit of shame here, I was even thinking of looping each track for each level, but the pause spoils the fun. <img src="smileys/smiley19.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)