How to: Rewind quest if counter drops too low

Announcements, support questions, and discussion for Quest Machine.
Post Reply
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

How to: Rewind quest if counter drops too low

Post by Tony Li »

A Quest Machine user recently asked how to "rewind" a counter-based quest if the counter gets too low -- for example, if the player is on the demo's Harvest 3 Carrots quest, gains 3 carrots, and then loses 1. At this point the player can't return to the NPC to turn in the quest. To handle this, add another node that checks if the counter has dropped too low. If this node becomes true, set the quest node states back:

Image

Make sure you're using Quest Machine 1.0.2+. In 1.0.1, a bug in counter conditions prevented it from reporting when a counter drops below an "at most" value. As of January 22, 2018, version 1.0.2 is pending on the Asset Store but should be available soon. If you need an advance copy, please PM me or email tony (at) pixelcrushers.com.
Post Reply