lucid's Recent Forum Activity

  • Hey lucid, it's @Chadori. Thanks!

    np. invite sent

  • Chadori - sure, what's your github info so I can invite?

  • RiledUp42

    2-20-2021b

    Marked as beta because it changes the way object initialization works.

    • Fixed a bug where starting a layout after a .scon file had been pre-cached on a previous start of layout could cause multiple scml instances to share the same container siblings.
  • Thanks for the example. That makes perfect sense.

    In the engine we have post-constructor 'OnCreate' methods which run when everything has finished initializing, so we avoid this type of problem. I'm not sure if we exposed that to the SDK though.

    It doesn't seem to be part of runtime instance. It would be useful and convenient, but it wasn't needed to fix my issue.

  • I don't think it will be feasible to fix this, since IIDs are lazy-assigned (so GetIID() will actually go and assign IIDs), and if you do that during a constructor, the object has not finished being created yet so won't be found for IID assignment. There's probably a bunch of things that don't work in the constructor, because in the constructor, you're still in a halfway initialised state, and the engine is usually going to expect to see a fully initialised instance.

    So my advice would be: don't call GetIID() in a constructor. Why would you need to anyway? If I "fixed" this, I'd probably just make that throw an exception.

    I was calling this as part of a workaround for when the plugin fetches a character from preload and GetSiblings() turned up empty. Is there already a way to set the sibling ids to stale as well? or have force it to reassign them? If not, I'll just move all the sibling and iid related initialization steps out of the constructor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • RiledUp42 - just an update. I looked into this and I found the source of the issue is a bug with the C3 SDK. I at'd Ashley in a new thread about it and I will report back here when I get a resolution.

  • Ashley

    I think I found a critical bug in the SDK. If you add

    var iid = this.GetInstance().GetIID();

    to the runtime instance constructor(inst, properties)

    It will cause the first and last instance of the object to have the same IID, verified using Debug Layout.

    This only seems to happen at start of layout where multiple instances are on already on the layout, or they are created at the start from existing container siblings. It might take place in other circumstances, but it didn't when I did a simple test of creating instances by clicking the mouse after start of layout.

    Here's an example project. The bundled addon is just the sdk drawingPlugin example with that one line added to constructor.

    EDIT: Also, I was able to partially 'fix' the issue by calling _objectType._SetIIDsStale(), but any container siblings for that instance are still set to the old siblings from the previously duplicated IID.

  • You do not have permission to view this post

  • A small-ish request I figured I'd post here: would it be possible to add a "color" option to the Scml object, to uniformly tint it - like the Sprite object? Thank you.

    Hi lucid. I've got a weird issue with containers going on. The first and last instances of Spriter objects in Construct 3 have the same container siblings if you load a layout, leave, and return. There's also a related issue where destroying said objects (which you can do in the attached example by hovering the mouse over them) causes a softlock if you reload a previously visited layout (which you can do by left clicking). This all seems to be related to the previously mentioned container issue.

    Example is attached. An assist on this would be appreciated. Thanks!

    https://www.dropbox.com/s/civrmzk1pc1qkoq/Spriter%20Container%20Issue.c3p?dl=0

    I will look into these. Thanks for the example file.

  • Sounds good. Thank you.

  • You do not have permission to view this post

  • You do not have permission to view this post

lucid's avatar

lucid

Member since 16 Jan, 2009

Twitter
lucid has 22 followers

Connect with lucid

Trophy Case

  • 15-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies