Yes, No

OurJud
I can't believe how difficult I'm finding this TA mode! I've wasted the last 90 minutes trying to do something that I suspect is ridiculously simple.

My game is a sci-fi, and the game starts in earnest with the message:

"The soft, female tones of your alarm clock drift into your subconcious. "Good morning, sir, this is your eight am wake-up call. Would you like breakfast this morning?""

All I want to do at this point is create two different responses to the inputs of 'yes' and 'no', but I' damned if I can do it. I created two exists, one called 'yes' and the other called 'no'. For the 'yes' object I set the default text to "Wonderful. Preparing now". and for the 'no' exit I set the deafult text to, "As you wish."

But when I run the game and type either yes or no, I get "I don't understand that command".

What am I doing wrong??

OurJud
OK, so I've discovered that 'go yes' gets the desired response. But that doesn't make sense, so how do I make it understand a plain 'yes'.

Also I can't use 'no' as the alias for the 'no' room, because it tries to auto-complete it to 'north'

Silver
Um "say yes"?

OurJud
I've deleted the yes and no exits now, so can't try it. I think I'll just skip the alarm clock asking if you want breakfast, then I don't have to worry about it.

Creating a question which responds differently to a yes/no answer shouldn't be this difficult, but I've wasted the whole damn day trying to do it! :x

HegemonKhan
Some conversation~dialogue help~guide links:

http://docs.textadventures.co.uk/quest/guides/

http://docs.textadventures.co.uk/quest/scripts/ask.html
http://docs.textadventures.co.uk/quest/ ... tion1.html
http://docs.textadventures.co.uk/quest/ ... tion2.html

http://docs.textadventures.co.uk/quest/ ... ktell.html
http://docs.textadventures.co.uk/quest/ ... stion.html
http://docs.textadventures.co.uk/quest/ ... tions.html
http://docs.textadventures.co.uk/quest/ ... tions.html
http://docs.textadventures.co.uk/quest/ ... swers.html

http://docs.textadventures.co.uk/quest/ ... _menu.html

http://docs.textadventures.co.uk/quest/ ... witch.html
http://docs.textadventures.co.uk/quest/ ... cript.html
http://docs.textadventures.co.uk/quest/ ... _case.html
http://docs.textadventures.co.uk/quest/ ... tiple.html

http://docs.textadventures.co.uk/quest/ ... lates.html

Instead, for now, you might want to use the built-in 'ask~ask a question (whatever it is called)' Function:

http://docs.textadventures.co.uk/quest/scripts/ask.html
http://docs.textadventures.co.uk/quest/ ... tion1.html
http://docs.textadventures.co.uk/quest/ ... tion2.html

as it sets up the scripting for you (in code it looks like this):

http://docs.textadventures.co.uk/quest/scripts/ask.html

(you don't need the '=true' and '=false', see the link above for writing the code without my use of '=true' and =false', as Jay hates me doing it, but I like to show what's fully happening in the code, so people new to coding can see and understand it better, and also for me, it helps with the organization even if it does make the code more messy~cumbersome, as I know what each code line is doing, esepcially when that 'else' code line is many lines down from what it is an 'else' of, so I can properly code it for the right thing. Though coders understand what's going on with the code, so they like to 'keep it simple', which is a good creed, so long as you already understand what and how the coding works and can code it properly)

msg ("The soft, female tones of your alarm clock drift into your subconcious. /"Good morning, sir, this is your eight am wake-up call. Would you like breakfast this morning?/"") {
// you choose 'yes' (true) or 'no' (false)
// internally it converts your choice of 'yes' into true or 'no' into false
if (result = true) {
// for your thread topic: goto 'pageX'
} else if (result = false) {
// for your thread topic: goto 'pageY'
}
}


----------------

a day of trying to figure out how to code, do something (in code or via the GUI~Editor) for~in quest, is quite normal, laughs.

you've no idea how many minimum of 6 hours I've spent on doing just 1 single simple thing in code, laughs. Let alone trying to do coding that takes me 3 days to a week to finally figure out... argh! (then Jay or the other programmers come around and do it in 5 minutes, and it's so much more efficient, clean, and clear coding, GRRR! lol :D )

(it's taken me 2-3 years to be at where I am now... it is really a SLOW process, you're trying to do too much and too advanced stuff... try to take a lot more slow and do small and simple things. Don't try to figure out how to do something on your own right now, that's why it's taking you 3 hrs, instead pick something that is already done for you, and learn it, understand it, be able to do it yourself from memory. Build up your knowledge from others first, then you'll be able to figure out stuff on your own, unlike now, as you don't have a knowledge base to help you with figuring out how to do stuff)

OurJud
Thanks, HK. So that code goes in the description box?

HegemonKhan
if you want to work with code... otherwise, use the GUI~Editor, find its 'ask~ask a question', see the 3 'ask' links (in my post above) for guidance in the GUI~Editor (1 of them is the code link though)

-----

I'm not sure exactly what you're trying to do in your game, I don't know your design, so I'm unable to answer where you want to put this code. I need more details about your game design ~ what you're trying to do and how.

for TA, you might want to use instead, the 'whatever' Room Object's 'Scripts' Tab's 'on entering room' or 'on entering room for first time', for scripting.

though, if you can set your 'description' as a script (instead of just text), then yes, you could add the 'ask' Function to the 'description'.

OurJud
Well I've scrapped the ask idea for now, but may come back to it.

For now I have another stupidly simple problem I can't figure out (see other thread)

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums