Puppetmaster & QM

Announcements, support questions, and discussion for Quest Machine.
Post Reply
dancinggoat23
Posts: 29
Joined: Mon Mar 02, 2020 1:44 pm

Puppetmaster & QM

Post 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.
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Puppetmaster & QM

Post 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.
dancinggoat23
Posts: 29
Joined: Mon Mar 02, 2020 1:44 pm

Re: Puppetmaster & QM

Post 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!
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Puppetmaster & QM

Post by Tony Li »

Glad to help!
Post Reply