Teejam's Recent Forum Activity

  • Well now you have two 'On start of layout' triggers, one which sets the variable, and another that gets it. It works if it does set then get, but it doesn't work if you get then set. So you've created a dependency on the order on which Construct runs 'On start of layout' triggers. It's best to avoid depending on internal details like that. If you initialise everything in one 'On start of layout' trigger, then you have clear control on the order things happen.

    OK, thanks for the advice. I'll need to store the level variables in a different way, then, since we can't know for sure what order Construct will start each sheet it sounds like. I'm just trying to get all the sprite behavior and positioning set before the layout becomes visible, and need those variables updated level by level beforehand. I'll do it a different way. Thanks :)

  • You just need to add the "Platform" behavior to that sprite, and probably remove it from the one on the bottom left.

  • ^ I forgot to mention that in my example you'd also put the global into a third sheet, like this:

    dropbox.com/s/kpvcz4aovprg4gn/New%20project.c3p

  • I must be misunderstanding how Construct deals with the start of layout condition, then.

    To recreate what's happening in my game with what you put together Ashley, if you take the "Set text" action you have in sheet 1 and paste it to sheet 2, then change the condition from every tick to start of layout, you'll see the variable reverts back to the default, even though we set it earlier.

    That's analogous to what I'm trying to do - update game level variables from the default sheet for the layout, then include the other sheets that use those new values. It doesn't seem like I can set them without adding some kind of delay or something in between sheets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi -

    This is a newbie question: I can't figure out how to update global variables on an event sheet before I include another one.

    Say I have a layout that should update some globals I set earlier (level number increase, number of enemies increase, etc.) before going on to the displaying and the mechanics of the game. Like this:

    In that layout's event sheet I set System > On start of layout > Set variable to x, above the rest of the included event sheets (for displaying and the mechanics of the game), but the events in those included event sheets still use the default global variable values.

    Are includes not synchronous? I'm sure there's a simple answer for this but I can't seem to find it. Thanks :)

  • I'm having the same exact issue, as well. The game runs smoothly in the Chrome app, and terribly using Phonegap Build with no special plugins. I tried Crosswalk, even though it's not maintained, and it worked a bit better but still poorly. I also tried disabling hardware acceleration to see if that made a difference, thinking that if it didn't maybe it wasn't enabled to begin with, and the game performed even worse.

    Has anyone tracked down the issue by any chance? I created a super simple app through PGB of a sprite moving across the screen, and the movement was still jerky. Again, in the mobile browser, smooth as silk.

Teejam's avatar

Teejam

Member since 18 Jan, 2018

None one is following Teejam yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies