Page 1 of 1
Posted: Wed May 26, 2021 3:59 pm
Could someone explain this script to me please?
I'm trying to get it so that a specific word is needed to open up a portal. I can use this script to set a free text box, along with a question and a correct answer to be inputted. But I can't seem to work out how to make the next convo node conditional on getting a correct answer - it always displays the first node, regardless of input.
Any advice gratefully received! thanks
Posted: Wed May 26, 2021 7:04 pm
Pongo, have a look at the screenshot below, this is where I use the ManualKeyboardInput script to prompt the player for the name of guild sponsors, which essentially acts as a password.
You would create 2 NPC nodes. The top one is for giving the correct answer, and you attach the script as a conditional to this line. Parameters 1 to 3 are possible accepted answers, and it is parameter 4 where you put the actual question. Then, opening the door is set as an action script attached to the player END DIALOGUE line.
The bottom NPC response is the fall through for when players don't give the right answer. You would type the appropriate dialogue for failing to answer the question.
Hope that helps!
Posted: Thu May 27, 2021 5:22 am
Great, thanks Dorateen! I'll get that set up later.
Posted: Thu May 27, 2021 8:09 am
Thanks again Dorateen - got it working! Its great to have free text options for riddles and puzzles, it opens up a load of opportunities.
For reference, in case it helps anyone else, my problems were:
- I'd added the script as an Action rather than a Condition.... pretty basic error, but I didn't spot it until comparing with your screenshot. Doh.
- I'd left the third parm blank, assuming the script would skip over it - but in fact it meant the script was accepting any answer to the riddle in addition to the two specific answers I'd added in parms 1 and 2. The text in the script itself advises "if you leave/set parm1 to parm3 at "none", it will not be used for checking" - I just assumed leaving the parm blank would have the same effect without really thinking about it.
Both now sorted, script makes perfect sense, and riddles are up and running.
Posted: Thu May 27, 2021 2:08 pm
It took me a little time to figure it out too, but the script works fine. I also recall needing to use all three parameters for answers to get it to trigger properly.