Forum rules - please read before posting.

How to check two variables in the same actionlist

Hey Chris,
I'm working on a puzzle where the player is not allowed to use the flashlight or run. If they do, the loop resets.

The puzzle works fine if I track only one variable (either flashlight use or running) in the ActionList. However, when I try to track both variables in the same ActionList, the puzzle stops working.

https://prnt.sc/TsIRlX_gvY_U

Comments

  • Running two Variable: Set Actions in succession as you are is correct. However, if it's a case of both needing to be True, and the same result occuring it either are False, then you need to have the If condition is not met output for both link to the same place.

    That is, Action (6) should run Action (3) if the variable is False.

  • No, they don't both need to be true. The conditions should be:

    • If both are true, the scene resets (puzzle NOT solved).
    • If either one is true, the scene resets (Puzzle NOT solved).
    • If both are false then the player will move to the next scene (puzzle solved)

    Currently, the puzzle only works if both variables are true. Is it possible to modify it so it works based on the conditions mentioned above?

    https://prnt.sc/mT-bPBUI1EFd
    https://prnt.sc/61-XrYCdQq_y

  • edited April 5

    You don't need a check if both are true, because if one is true it already resets and the puzzle is not solved.

    Where do you check for the Input?
    You need to set the variable in your active Inputs, so if you press either running or/and the flashlight button put a Variable: Set true in there.

    And wherever you check what you posted here, should work, take out the Variable: Sets and just have both Variable: Check like they are.

  • Thank you for the explanation, Miko. After following your graph, I can confirm the issue is now resolved!

    https://prnt.sc/CUcFcvzuC8AU

  • Cool to hear :)

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.