on start of layout works before second tick

0 favourites
From the Asset Store
_______ Huge collection of metal fixtures ________
  • I have an event:

    on start of layout

    + global var something = 1

    === hide some sprite

    and the sprite flashes briefly in the first frame of layout and then disappears.

  • Do you have any file to upload, so we can help you better =]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • what's there to help with, it's a bug :) the sprite should be hidden before first frame is drawn not after, simple as that :) but thanks anyway, cheers!

  • It actually does matter. I just tried it and it works. Please post your .capx, if it is a bug it'll help Ashley, if it isn't a bug it'll help people help you.

  • sorry, didn't know that it works in single layout, so it's got to do with on start of second layout, or subevent with instance variable, here's the capx, take a look please, the "locked" appears briefly though it shouldn't as it gets destroyed on start of second layout:

    mediafire.com

    hope that helps. cheers!

    also, Ashley, can you give eta on next build? I've been waiting really badly for touch / button / text field bug to be cleared out of the way for me, this got me checking the download page at least a 100 times today.

  • bump? still there in r78 :(

  • From the sticky:

    - often we're busy, so if there's a short one-line answer asking to clarify, please don't think we're being rude, we're just trying to get to the bottom of it as quickly as possible.

    - if we're busy it may take a couple of days to get round to the report. We're on it though!

    - some bugs are much more difficult to fix than others and might take longer.

    I know Ashley makes it look easy, but these things do sometimes take a while. :)

  • of course, you're right, but

    "often we're busy, so if there's a short one-line answer" ;)

    if there's not even a one line answer and also this is not corrected in the latest build I can assume that this one was forgotten or simply not seen by devs. that's why I'm bumping. also, don't think I'm being rude, I just wanted this to be seen :) cheers and thanks!

  • Well, that's why I included this part too:

    - if we're busy it may take a couple of days to get round to the report. We're on it though!

    So no, don't assume it's been forgotten, it's only been 2 days! I also don't mean to imply you're being rude, I'm simply stating you should wait a little longer before assuming it's been forgotten about. Patience! :)

  • ...which i'm lacking clearly. sorry for being impatient then :) won't be next time, promise

  • not bumping this time, but similar bug occurs (maybe it's the same cause, but please be aware of that) - behaviours also seem to activate after first frame is displayed, best seen with anchor behaviour.

    mediafire.com

    if you make your window thin and tall you can see about one frame full black (loading) one frame white with black box in the middle of the left side (bug) and third and following frames the black box will be positioned to the left bottom (as it's meant to be). this only occurs when NOT in first layout, so it seems that behaviours become active and run their events AFTER first tick and frame is drawn.

    cheers!

  • Looks like the time taken by the browser to redraw things.

    It has the same kind of delay when I'm looking at this very forum and resize my browser. The middle/body section takes a little time before getting drawn in the center again.

    Not sure it is C2 specific.

  • this forum is html, C2 canvas is... well... canvas :) and in the canvas the object should be drawn AFTER its behavior / events are set not BEFORE in every tick. in other way, right now it's like (excuse my pseudo coding)

    // tick start
    canvas.drawThingsOnIt();
    foreach(i in canvas.objects) {
       canvas.objects[i].runBehaviors();
       canvas.objects[i].runEvents();
    }
    // tick end
    

    and it should be like:

    // tick start
    foreach(i in canvas.objects) {
       canvas.objects[i].runBehaviors();
       canvas.objects[i].runEvents();
    }
    canvas.drawThingsOnIt();
    // tick end
    

    hope that helps to explain what I mean. also I do remember similar bug in construct classic, kinda like the every X ms precision bug :)

  • Technically, that wasn't a bug. It was just kind of unintuitive.

  • it was and still is a bug, on collision events also are run AFTER frame has been drawn, so I think this is larger than it appeared. and the on start of layout bug appears only when it's NOT a first layout. haw this cannot be a bug?

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