Forum rules - please read before posting.

local variable check in actionList

Hello there, I seem to be in a bit of a pickle.

I think I need to check for a local variable value, through an actionList. Is that possible?

Here's the setup: I have an Inventory item (a book) that once examined, reveals a new item (a note) and adds it to the Inventory, while still keeping the original book in the Inventory. I need a bool check in there, so that if the book is examined again, it doesn't reveal another note indefinitely, and just switches to some "nothing else here" flavor text.

The problem I'm facing is that the "Variable: Check" Action does not have a "Source" field, when I'm using it in an actionList. This means I'm only able to check against global variables. I guess I could set a global bool to check against, but this feels wrong, as the book and note are essentially local items, they are only ever used in one level and never seen again.

I've used the "Inventory: Check" Action to get the job done, checking against the note, but the problem is that the note can be used and discarded before the book is discarded. This can lead to the book being re-examined and giving a new note etc.

Is there something I'm missing here? How can I have an Inventory Interaction fire only once in a level?

Comments

  • Local variables cannot be read within ActionList assets - since they need to be able to work regardless of what scene you're in.  And while you're inventory item is only used in one scene, technically it can be used anywhere.  However, you have a couple of options:
    1. Move the bool to your list of Global Variables, so that it can be read within an ActionList asset.
    2. Keep the bool Local, but have the Inventory interaction run a local Cutscene when clicked, and have the Cutscene to the checking.  Within the ActionList asset, use the "ActionList: Run" Action to run a local Cutscene.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.