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 | 
 

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

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


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

PostSubject: Talking to Character - checking code........   Wed 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
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: Talking to Character - checking code........   Wed 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.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.


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


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

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

Great Thanks Phil.....

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

Gareth
Back to top Go down
View user profile
Sponsored content




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

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: