Hi Tony,
I have a script that moves NPCs to different locations during a dialogue node (e.g., a few feet to the right). But if you repeat the dialogue, it obviously runs that script and moves them to the right again. Is there any way to only execute a script within a node only once? Maybe something with the SIM status? Looked around a bit and couldn't find an easy solution.
Thanks!
Run script in node only once
Re: Run script in node only once
No; you'll need to use two separate nodes.
-
- Posts: 113
- Joined: Sun Sep 20, 2020 8:21 pm
Re: Run script in node only once
Hmm... that could end up being hundreds and hundreds of nodes (and variables for conditions). Is there some more automated way I could go about coding it? Happy to put in the work, just want to make sure I approach it from the right perspective.
And thanks for the quick response - hope you had a nice holiday so far!
And thanks for the quick response - hope you had a nice holiday so far!
Re: Run script in node only once
In the Script field, you could call your own C# method (see here) and in that method check if you should do the action or not.