gcCheckManualKeyboardInput.cs

Discuss IB/IBx toolset ideas, bugs, etc.
Post Reply
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

gcCheckManualKeyboardInput.cs

Post by Pongo »

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
User avatar
Dorateen
Posts: 321
Joined: Thu Jan 16, 2020 3:03 pm

Re: gcCheckManualKeyboardInput.cs

Post by Dorateen »

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!
HearkDoor.png
HearkDoor.png (44.84 KiB) Viewed 16955 times
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: gcCheckManualKeyboardInput.cs

Post by Pongo »

Great, thanks Dorateen! I'll get that set up later.
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: gcCheckManualKeyboardInput.cs

Post by Pongo »

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.
User avatar
Dorateen
Posts: 321
Joined: Thu Jan 16, 2020 3:03 pm

Re: gcCheckManualKeyboardInput.cs

Post by Dorateen »

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.
Post Reply