Forum rules - please read before posting.

How to get Character: Set attachment properties in a Action List?

Hello,

I need attachments for my skeleton, like a briefcase for example. But when character walks, said briefcase dissapears, because skeleton gets replaced to display another pose.

Basically I am trying to fix that by keeping track of the attachment that was set via Character: Set attachment:

... then I would need to re-set the attachment on new skeleton poses by using a new script.

What I need is to find the moment where that attachment is changed, and save it for future use, but no idea how to do that. Tried to useOnBeginActionList with no sucess.

Any info on this would be appreciated, thank you.

Comments

  • edited March 2023

    What you'd likely want is a custom script with a LateUpdate function, checking for a change in skeleton each frame. When a change is detected, re-apply its attachments.

    This isn't involving AC, however. Instead of hooking into OnBeginActionList, you'd be better off having the above custom Action call a function on the new script, which both applies the attachment and records it - so that it knows what change to make upon detecting a change in skeleton.

  • Ah okay, I will do a custom function then. I thought there was some sort of event to detect that, like when characters start speaking. Thanks for your time.

  • The OnStartSpeech event is fired when characters start speaking - a tutorial can be found here.

    A full list of available events can be found in the Manual's "Custom events" chapter.

    However, since animation changes can come from a variety of sources, it may ultimately be easier to brute-force such checks in a LateUpdate loop as above.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.