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 | 
 

 random character replies

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: random character replies   Sun Feb 06, 2011 6:28 pm

HI Guys

Im sorting some character interaction and just wondered if I use the %r% action in the cmess reply will it give a random cmess response as in normal cmess usgaes. I have tried it but I get the %r% showing in the test - Have I missed something or is this one of the cannot do's with this command?
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: random character replies   Mon Feb 07, 2011 12:02 pm

garethfx wrote:

Im sorting some character interaction and just wondered if I use the %r% action in the cmess reply will it give a random cmess response as in normal cmess usgaes. I have tried it but I get the %r% showing in the test - Have I missed something or is this one of the cannot do's with this command?

Gareth,
You have to get the %r% tags in the right places for it to work smoothly of course.
I'm not quite EXACTLY sure what sort of character interaction you mean but you CAN use random %r% tags in a custom message (cmess) action in the CHARACTER SPEECH RESPONSES list (found in the Character Editor)

Example usage of %r% tags in a cmess action for a HELLO type command:

[start]hello#charpresent%speech%[acts]cmessThis is random text 1.%r%This is random text 2. %r%This is random text 3.[end]

You therefore might enter such a code snippet as this:

[start]hello#charpresent%speech%[acts]cmess%speechname% says hello.%r%%speechname% bids you a cheery greeting.%r%%speechname% acknowledges your welcome.[end]

You might need to add carriage returns to your random message elements so you could do this:

[start]hello#charpresent%speech%[acts]cmess%speechname% says hello.
%r%%speechname% bids you a cheery greeting.
%r%%speechname% acknowledges your welcome.
[end]

Above code would work for ALL characters by default - but that is customizable etc... using the "speech" CONDITION

Also worth checking out other forms of Character Speech Messages

For instance:

charmsgX - where X is a MESSAGE number. Print EACH Speech Character's INDIVIDUAL response to a command confined in ONE message....

Use a blank, spare or unused message for character replies using this action.

>say to <character>, hello

Message450
-----------
command HELLO
This message deals with player saying hello to character.
'REM comments are allowed.

%ch1%%speechname% says: "Hello".%ch1%

%ch2%%speechname% says: "Hello to you as well!"%ch2%

%ch3%%speechname% greets you pleasantly with a courteous nod.%ch3%

%chdef%The %speechnoun% welcomes you with a smile.%chdef%

===========
Remember to add carriage returns to elements of ordinary messages if you need to

Char Response Command:

[start]hello#charpresent%speech%[acts]charmsg450[end]

PLUS You can use random %r% message tags inside of %chX% tags as well. Remember to use correct format for random message elements.

Also there are other Character Speech Actions:

speech=charn1 - set speech to be number of charn1
speech=charn2 - set speech to be number of charn2
speech=X - set speech to character number X (1-100)

And also these

charobjn1msg - Prints objn1 examine text response by speech character
charobjn2msg - Prints objn2 examine text response by speech character
charcharn1msg - similar to "charobjn1msg". Prints Character n1 examine text response by speech character
charcharn2msg - similar to "charobjn2msg". Prints Character n2 examine text response by speech character

Hope this helps. Let me know.

catventure (Phil)


_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
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: random character replies   Mon Feb 07, 2011 3:40 pm

Thanks Phil
[start]hello#charpresent%speech%[acts]cmessThis is random text 1.%r%This is random text 2. %r%This is random text 3.[end]


Yep got those examples in place but noticed you dont have inverted commas - Ill look again in case Ive allowed a space between end of text and the % - I know its something silly lol Just need to make sure Id not lost it altogether....

Cheers again phil........ Those addition example were also worth seeing
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: random character replies   Mon Feb 07, 2011 3:43 pm

Great! Ok then prolly a syntax error or something out of place hopefully.

Keep posting any questions you need.

Smile

Catventure.

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




PostSubject: Re: random character replies   

Back to top Go down
 

random character replies

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: