I have the following tree
When the player first goes down this branch I would like to play an alert that says "New Quest..."
I would like this to only happen the first time they go down this tree.
What's the best way to ensure that it only happens the first time?
Here is what the "Quest Alert" node looks like at the moment.
It seems like even though there's no dialog you still have to press the advance key to get past this "Quest Alert" node. Is there a way to just passthrough the node and execute the scripts in it without waiting for the continue button to be pressed. Or perhaps there's a cleaner way to do this entire thing.
Thanks!
What's the proper way to only show an alert once?
Re: What's the proper way to only show an alert once?
Hi,
There are two parts to this:
1. To pass through a node without showing any text or waiting for a continue button click, tick the node's Group checkbox or set its Sequence field to:This will simulate an immediate continue button click. If you don't want to type it, from the "+" menu select Continue > Simulate Continue Button Click.
2. To show a node only once, set Conditions. I see that you've set Conditions on this node already, and it looks like those Conditions should work fine with #1 above. If you wanted to allow the player to reach some node more than once but only show the alert once, you could use an "if..then" statement in the Script field, such as:
There are two parts to this:
1. To pass through a node without showing any text or waiting for a continue button click, tick the node's Group checkbox or set its Sequence field to:
Code: Select all
Continue()
2. To show a node only once, set Conditions. I see that you've set Conditions on this node already, and it looks like those Conditions should work fine with #1 above. If you wanted to allow the player to reach some node more than once but only show the alert once, you could use an "if..then" statement in the Script field, such as:
Code: Select all
if (Variable["ShowedThisAlert"] ~= true) then
Variable["Alert"] = "This is an alert"
Variable["ShowedThisAlert"] = true
end
Re: What's the proper way to only show an alert once?
That makes sense, thanks so much!
Re: What's the proper way to only show an alert once?
Glad to help!