Jump to content

Bug in Construct 3 with Set C2 to Spriter Object


xrabidx

Recommended Posts

It seems that when there are multiple instances of a Spriter object, the action "Set C2 to Spriter Object" get confused and attempts to attach to the Spriter object with the highest Instance ID (so if there is 2 Spriter objects, it will attach to Spriter with IID of 1. 

Meanwhile, if I set position using pointX/pointY or objectX/objectY, everything goes to the correct position, but it seems that all animation is about a single tick off.

If this is a bug in the plugin, and not my own stupidity of missing something blatant, and I know that there hasn't been an update to the C3 addon in a while, is there any way you guy can release the source code for the plugin so that we can take a stab at fixing the bug?

My sincerest appreciation for your time with this manner.

I have attached a Construct 3 project file that I quickly threw together that recreates this issue.

Spriter_Problem.c3p (Layout 1)

--- EDIT: I believe a solution might have been found, please read my post below.

Link to comment
Share on other sites

Okay, so my team desperately needed a fix for this, so we spent the weekend getting intimate with the C3 SCML addon.

We figured out that what was actually happening was that only the last construct object in the instance array was being set, always when using "setC2toSpriterObject"

It took us a bit to figure out that the .c3addon is just a renamed .zip file (lol) -- and once we had the source code, we dug deep into the "setC2toSpriterObject" function.
Going through the massive run time file we eventually figured out that on line "2160" the "c2Obj" variable was being set to "getFirstPicked()" -- we changed this to "getPairedInstance(this)" to get the paired instance of the c2 object, and everything magically snapped into place the way it should be.

I don't know if this is the absolute most correct solution, or if I am blatantly missing something else once more, but for now our project is back on track, and the team is happy. I look forward to any input the Spriter devs might have on this.

For anyone searching for this problem on Google or the forums, I've attached a fixed scml.c3addon -- I make no guarantees, but it works for us so far.
You can verify this for yourself using the test .c3p file from the previous post. 

scml3.c3addon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...