Track multiple interactions with Quest Giver within a single Quest

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Track multiple interactions with Quest Giver within a single Quest

Post by mroshaw »

Hi again!

I have a Quest that has a structure a bit like this:

Quest Start > Talk to Quest Giver > Fetch Item > Return to Quest Giver > Quest Complete

I have a Message Condition on "Talk to Quest Giver", looking for the "Discussed Quest" message.

I have a Condition on Fetch Item that uses the Invector "Player has n items", checking that the player has collected the item.

I have a Message Condition on "Return to Quest Giver", again looking for the "Discussed Quest" message.

The issue I have is that when I collect the item, the Quest goes straight through "Return to Quest Giver" and into Quest Complete. I'm guessing this is because the "Discussed Quest" Message condition is strictly "true", as the Player discussed the Quest at the "Talk to Quest Giver" state. What I was hoping was that the message would be "popped" from the stack, so that I could use the same condition on "Return to Quest Giver", essentially waiting for a second "Discussed Quest" message to appear.

I hope this makes sense!

I wonder if there's a way to check to see if the player has had a second interaction with a Quest Giver, after successfully meeting a condition on a previous state?

Many thanks again if you can help me out!
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: Track multiple interactions with Quest Giver within a single Quest

Post by mroshaw »

Okay, bit of user error here - somehow, I'd managed to join the Fetch Item node to the Success node! The connector was behind the nodes, so I didn't see it. My bad!

I've used the SetQuesterQuestNodeState LUA function in my dialogue to move the 2nd "Talk to NPC" node to success, and it's all working brilliantly! :D
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Track multiple interactions with Quest Giver within a single Quest

Post by Tony Li »

Great! I was just about to reply with a working example, but you beat me to it. :-)
Post Reply