lucid's Forum Posts

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

  • 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

  • Ashley

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post