When does anchor behavior take effect?

0 favourites
  • 4 posts
From the Asset Store
A total of 214 high quality and unique magic sound effects suitable for RPG, Battle Arena and more!
  • From experimentation, it would seem that anchored objects are not moved to their anchored position until after the events in an "On start of layout" trigger.

    Is this correct? I have been working on a minimap with the MM field anchored, and calculating the offset would come out wrong if the calcs were done in the "start of layout" trigger, but they'd come out right if done anytime after that. I ended up making a combination trigger of "every tick" plus a do-once condition to make it work.

    I would just like to confirm the theory and make sure I am not making an assumption that will mess me up later.

  • My one and only bump, in case anybody missed it.

  • Can't you just have something that fires off after the start of layout action? Like maybe a function called in start of layout, and the function handles the Anchor?

    Or perhaps, have the HUD/UI layer that is anchored be invisible then after a few seconds anchor everything and then fade them in?

    Mainly just brainstorming ways to give you time to get through start of layout first. I haven't messed with it much myself as I haven't had much time today. Maybe someone else has an idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had done basicallly what you suggested, in the form of a block that runs every tick, but with a secondary condition based on a do once variable. It works ok, I'm just trying to get a handle on how things work exactly in construct 2.

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