Page 1 of 1

Puppetmaster & QM

Posted: Mon Dec 07, 2020 9:16 pm
by dancinggoat23
Hello

I've integrated Puppetmaster with my character object, which is also a quester with quest journal, etc. Up until now, QM worked fine, but during PM initialization it creates a duplicate of the character object, strips all but the PM component, and moves the character game object under an empty root g.o. alongside the PM g.o.

Apparently, all of this makes QM angry, because the quest I assigned at edit time to the character disappears. I don't see any messages in the log, and QM thinks the quest is unassigned once the game has started.

In an attempt to solve this issue, I set the quest journal to be disabled, and only enable it once the PM init has completed. However, this doesn't help...

Does anyone have ideas? I'm guessing that for the brief moment that there is a duplicate of the character, QM must decouple the character from the quest. I am about to try using code to assign the quest post-init, but I feel like I'm going down a rabbit hole here.

NOTE: the original character g.o. is not altered by PM in anyway, other than being moved in the object hierarchy under the empty transform.

Re: Puppetmaster & QM

Posted: Mon Dec 07, 2020 9:56 pm
by Tony Li
Hi,

What's happening is that the duplicate copy of the Quest Journal is getting destroyed, so it tells Quest Machine to unregister the quests owned by its ID. However, this is the same ID that the original Quest Journal has, so it unregisters the quest underneath the original, too.

The simplest solution is to move the Quest Journal component off the player GameObject entirely. There's no requirement that it must be on the player GameObject. You could put it on another GameObject, even the Quest Machine GameObject if you want.

Re: Puppetmaster & QM

Posted: Mon Dec 07, 2020 10:22 pm
by dancinggoat23
I posted my reply here before I saw your answer. YES. Thank you, that will solve my problem nicely. Awesome as always, Tony!

Re: Puppetmaster & QM

Posted: Tue Dec 08, 2020 8:14 am
by Tony Li
Glad to help!