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!
Talking to Character - checking code........ I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Talking to Character - checking code........ I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Talking to Character - checking code........ I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Talking to Character - checking code........ I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Talking to Character - checking code........ I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Talking to Character - checking code........ I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Talking to Character - checking code........ I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Talking to Character - checking code........ I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Talking to Character - checking code........ I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 Talking to Character - checking code........

View previous topic View next topic Go down 
AuthorMessage
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 66
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

Talking to Character - checking code........ Empty
PostSubject: Talking to Character - checking code........   Talking to Character - checking code........ I_icon_minitimeWed Feb 02, 2011 8:07 pm

Hi guys

Just wanted to check one bit of code so that I can move on (I hope)

In the code below

[start]talk to %charn2%#charpresentn2#charn2<>3[acts]cmessYou talk to %charname2% for a minute...[end]

the section " charn2<>3 " is that stating that character 2 is not equal to character 3 ?

Gareth
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

Talking to Character - checking code........ Empty
PostSubject: Re: Talking to Character - checking code........   Talking to Character - checking code........ I_icon_minitimeWed Feb 02, 2011 11:05 pm

garethfx wrote:

[start]talk to %charn2%#charpresentn2#charn2<>3[acts]cmessYou talk to %charname2% for a minute...[end]

the section " charn2<>3 " is that stating that character 2 is not equal to character 3 ?

No.

This is a general purpose entry covering a "talk to <character>" type of command... Roughly translated it means:

IF a relevant character is present AND IF the character is NOT Character 3 in the Character Editor list THEN proceed and DO the actions of talking to the character which in the example prints:
"You talk to <character name> for a minute."

"charn2" is a variable that holds the NUMBER of the character referred to in %charn2% ie. it will do so if the second noun in the input phrase was a valid character noun typed by the player. So if the player types talk to fisherman and Bob the fisherman was Character 14 then "charn2" variable would be loaded with the fisherman's number - 14.
The "charn2" value can then be tested in a CONDITION such as "charn2<>3", "charn=12"; "charn2>=5" etc...

If the player tries to "talk to <character>" and the character in question IS number 3 in the Character Editor List - then the actions for this entry will not be triggered as condition "charn2<>3" will not be true.

As it stands, this entry will execute if used with ANY Character present EXCEPT for the Character number 3.

Regards,
Catventure.


Last edited by catventure on Fri Feb 04, 2011 12:11 pm; edited 2 times in total
Back to top Go down
https://adventure.forumotion.com
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 66
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

Talking to Character - checking code........ Empty
PostSubject: Re: Talking to Character - checking code........   Talking to Character - checking code........ I_icon_minitimeThu Feb 03, 2011 11:58 am

Great Thanks Phil.....

I can start putting in some characters now ....

Gareth
Back to top Go down
Sponsored content




Talking to Character - checking code........ Empty
PostSubject: Re: Talking to Character - checking code........   Talking to Character - checking code........ I_icon_minitime

Back to top Go down
 

Talking to Character - checking code........

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: