Page 1 of 1

QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 1:49 pm
by BWLGeorge
Howdy, having a small issue with QTEs and the Private Hart demo conversation doesn't have a QTE in it as mentioned in the documentation so I'm wondering if my formatting is just wrong because I don't have anything to compare it to.

I'm trying to set up a single QTE to work basically as an optional interjection. If the player presses it, it does a thing, if not, it continues as normal. I set up a variable for this called "swing," I've tried using it as a text variable and a number variable but both seem to have the same issue.

No matter what I have my initial value set as or my scripts are to change it, it seems that both pressing and missing the QTE default to a blank value for the variable. This doesn't seem to be reflected in the variable viewer either, the only way I know is that messing around with the variables and changing their values always has the same result: the dialogue nodes will act as if the value is empty.

Here's the setup I've mostly been testing with:
"swing" initial value = 0

First node's sequence:
QTE(0, 5, swing, 1);

Blank node with None() as its sequence

Left node:
Conditions:
Variable["swing"] == 1

Right node:
Conditions:
Variable["swing"] ~= 1

When I try this, both hitting and missing the QTE go to the node where the value of "swing" is not 1.

Here's another setup I tried to test this:
"swing" initial value = 0

First node's sequence:
QTE(0, 5, swing, 0);

Blank node with None() as its sequence

Left node:
Conditions:
Variable["swing"] == 0

Right node:
Conditions:
Variable["swing"] == 1

When I try this (or even switching the initial value) the conversation closes without going to either node (as if the value is neither 1 nor 0).

I have also tried both of these setups with a text variable, using "yes" and "no" or just "yes" and "~yes"

Wondering if you might have any insight into this one.

Re: QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 3:10 pm
by Tony Li
Hi,

Specify the value to set if the player presses the QTE. Here's an example:

DS_TestQTE_2023-05-28.unitypackage

It uses this command:

Code: Select all

QTE(0, 5, nice, true)
If the player presses the QTE (left mouse button), it sets Variable["nice"] to true.

Re: QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 3:21 pm
by BWLGeorge
In the examples I posted here I'm setting the value to "1," and "0" for a number variable respectively. I also mentioned tried it with "yes" for a text variable, both of those have the same issue with not correctly setting the value.

I just tested it with a Bool and it correctly triggers when the QTE is hit and the condition is setting the variable to "true," but missing the QTE doesn't correctly trigger the next node if the requirement is set to "false." For some reason the requirement for missing the QTE must be set to "~true" in order for it to work, which means there's still something not quite right in the QTE setting values.

--
Just saw I was using the outdated manual for QTEs, the note about the demo is removed in the current version.

Re: QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 3:23 pm
by Tony Li
Values will be either strings or bools, not numbers. When setting it to a bool, if the player didn't press the QTE, the variable may be false or undefined. So the proper way to check is to check if it's not true (i.e., Variable["swing"] ~= true).

---

Also, where does the manual mention that Private Hart's conversation has a QTE? Version 1.x's demo scene used a QTE, but I streamlined the demo for version 2.x and got rid of the QTE in the example.

Re: QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 3:27 pm
by BWLGeorge
I'm a bit confused then, as the example given in the documentation uses "yes," which implies it would be a text variable not a boolean variable. Should that read "true" instead?

Re: QTE Sequence Not Changing Variable

Posted: Sun May 28, 2023 5:16 pm
by Tony Li
Hi,

If the value you provide as the 4th parameter is "true" or "false", then the variable will be set to a Boolean value (true/false). Otherwise the variable will be set to a Text value (e.g., "yes").