Why are my Quests resetting? [SOLVED]


  • Posts: 194
I'm working on getting quest-specific dialog blocks in my game.  I am making nice progress!  In my test scene, I have an NPC and a Quest Item.  The NPC says something different depending on if you have interacted with the Quest Item. 

The issue now is, my booleans are resetting every time I leave the scene and come back!  I looked at Game Attributes, and how they are global values that are remembered across multiple scenes.

If you could, take a look at my NPC and Quest Item code blocks.  What am I doing wrong?  Game Attributes are purple, and the Booleans needed for this dialog to work are definitely purple.  Is there something I missed?

This is still an early version of my dialog code.  I'll go back and fix it up more after I take care of this resetting problem.

« Last Edit: June 17, 2012, 04:41:38 pm by acarnivorousocean »


  • Posts: 827
Your problem is here:

That "if After Quest = <true>" bracket is never going to fire, because you've set it to false immediately beforehand. "When created" code runs once and only once, when the actor is created (as the name implies). If you want to check it every frame, put it under "Always" ("When updating") instead.

EDIT: On a further note, "If <boolean> = <true>/<false>" is redundant. "If <boolean>" and "If <not <boolean>>" will suffice. "If" is based on true/false conditions to begin with.
In the event of a firestorm, the salad bar will remain open.


  • Posts: 194
Very cool.  Thanks so much for your quick reply.  I'll get to work on editing this block.  I had no idea that some of my stuff was redundant.  Looks like I'm on the path to writing much cleaner code blocks.


EDIT: Works perfectly!  It was such a simple fix too.

« Last Edit: June 17, 2012, 12:03:42 pm by acarnivorousocean »