TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

» sizex=y action ...
Thu Aug 09, 2012 11:29 am by catventure


Share | 
 

 player input as variable in actions

View previous topic View next topic Go down 
AuthorMessage
Locarin
Novice Adventurer
avatar

Female
Number of posts : 2
Adventure Points : 1
Registration date : 2012-02-29

PostSubject: player input as variable in actions   Sun Mar 04, 2012 5:49 pm

Hello. Hoping this software is still being maintained as I find it very easy to learn as use. I was wondering if it's possible to catch player input into a variable to use in an action? Example: I want to allow the player at some point to choose their next location depending on which number they enter. While I can limit the choices, I still wouldn't know which choice the player is making. So the answer could be captured in a {variable} and used in an action like goto{variable}, versus making a separate goto action for each possible answer. Can this be done?

Edit: one other question I almost forgot. Is it possible to use the ask command in an answering entry in script2? Say during a password entry, if the player enters the first number in an answer, can the entry in script2 confirm the answer as correct and prompt the player to add the next number in the password? I tried this on a test file with the previous question situation, but it didn't appear to do anything once I entered the second number in.
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: player input as variable in actions   Wed Mar 07, 2012 5:39 pm

Quote :
Hello. Hoping this software is still being maintained as I find it very easy to learn as use.

Hello Locarin and welcome to this adventure forum. Sorry for delay in answering. I do not have as much time to spend on the program as last year due to some commitments - but I will still be around to provide help and respond hopefully with some constructive ideas and suggestions...

Quote :

I was wondering if it's possible to catch player input into a variable to use in an action? Example: I want to allow the player at some point to choose their next location depending on which number they enter. While I can limit the choices, I still wouldn't know which choice the player is making. So the answer could be captured in a {variable} and used in an action like goto{variable}, versus making a separate goto action for each possible answer. Can this be done?

Possibly can be done - although maybe not so easily... I don't know how many numbers (choices) you require to implement this but I suppose you could enter the needed location option numbers as VERBS into the verb vocabulary eg:

/1/
/2/
/3/
etc.. etc..

and then after you've arranged the option text to be printed eg:
"Please enter a valid option number..." you could create a RESPONSE coding entry something like this:

[start]1[acts]goto1[end]
[start]2[acts]goto2[end]
[start]3[acts]goto3[end]
etc..
etc..

*** Above bit updated due to coding error! ***

You might also need to put qualifying room and or flag conditions in there too in order to restrict the operating of the response entry only at the correct time in your game.
Anyhow, it is an idea I just thought of to think over...

Quote :

Is it possible to use the ask command in an answering entry in script2? Say during a password entry, if the player enters the first number in an answer, can the entry in script2 confirm the answer as correct and prompt the player to add the next number in the password? I tried this on a test file with the previous question situation, but it didn't appear to do anything once I entered the second number in.

No. You can't use "ask" action in that way, I'm afraid.

Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
Locarin
Novice Adventurer
avatar

Female
Number of posts : 2
Adventure Points : 1
Registration date : 2012-02-29

PostSubject: Re: player input as variable in actions   Wed Mar 07, 2012 8:38 pm

Thanks, Phil. I had figured I would likely need separate actions for each choice, just wanted to be sure in case there was a variable option. I guess for my second option I'll just eliminate 'ask' and stick to response entries. I suppose in a way it's better as it won't pull up the ask box, which can break the flow a bit far as playing goes. Thanks again, your help is very much appreciated.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: player input as variable in actions   

Back to top Go down
 

player input as variable in actions

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: