I'm not understanding how execution flows through pulp script. I have the following code in a sprite. This is the first occurrence of
testVal2. Why does this only trigger the
say "test val 2" statement?
on interact do
if testVal1 == 0 then
say "test val 1"
if testVal2 == 0 then
say "test val 2"
log and you'll see both statements are being triggered.
say multiple things the last called will immediately replace any others.
If you want both lines to be said sequentially you need to concatenate the strings together into a single
say command using string formatting syntax like
You might also find
ask better suits some use cases for controlling code/dialogue flow.
That makes so much sense, thank you!