Page 1 of 1

Trigger Random answer?

Posted: Sat Oct 28, 2023 8:06 pm
by Hereder
Hi
I wonder if there is a simple way to allow my NPC to say one of 3 random options.
Is there anything I can write in the "Sequence" slot - Like "GoRandom()" similar to how we can write "None()" to ignore the slot all togheter...
random.png
random.png (55.59 KiB) Viewed 922 times
Thanks in advance!

Re: Trigger Random answer?

Posted: Sun Oct 29, 2023 12:03 am
by Tony Li
Hi,

Yes. Set the Doomsday node's Sequence field or Script field to:

Code: Select all

RandomizeNextEntry()
There's a sequencer command and a Lua function by that name, so you can use either field.

Re: Trigger Random answer?

Posted: Sat Nov 04, 2023 1:23 am
by Hereder
Fantastic, thank you soo much!

Re: Trigger Random answer?

Posted: Sat Nov 04, 2023 8:31 am
by Tony Li
Glad to help!

Re: Trigger Random answer?

Posted: Sat Feb 03, 2024 9:14 am
by Hereder
Btw, late reply but I ran in to a situation. Is it possible to combine RandomizeNextEntry() and None() ?
So the three, I leave it empty None() yet we randomnice the next entry?

Re: Trigger Random answer?

Posted: Sat Feb 03, 2024 9:40 am
by Tony Li
Hi,

I don't fully understand. Can you provide a screenshot of how you'd want to configure the conversation?