TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
player input as variable in actions I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
player input as variable in actions I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
player input as variable in actions I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
player input as variable in actions I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
player input as variable in actions I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
player input as variable in actions I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
player input as variable in actions I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
player input as variable in actions I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
player input as variable in actions I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 player input as variable in actions

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

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

player input as variable in actions Empty
PostSubject: player input as variable in actions   player input as variable in actions I_icon_minitimeSun 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
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

player input as variable in actions Empty
PostSubject: Re: player input as variable in actions   player input as variable in actions I_icon_minitimeWed 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.
Back to top Go down
https://adventure.forumotion.com
Locarin
Novice Adventurer
Locarin

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

player input as variable in actions Empty
PostSubject: Re: player input as variable in actions   player input as variable in actions I_icon_minitimeWed 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
Sponsored content




player input as variable in actions Empty
PostSubject: Re: player input as variable in actions   player input as variable in actions I_icon_minitime

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: