TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows in Alpha Development and made with thinBasic.
HomeFAQSearchRegisterLog in
Latest topics
» TAB Alpha Version 47 Available
Wed Dec 24, 2008 7:35 pm by catventure

» TAB Alpha Version 46 Available
Fri Nov 28, 2008 5:02 pm by catventure

» Long Nouns and Synonyms
Tue Oct 21, 2008 5:36 pm by catventure

» Container Scripts
Fri Oct 17, 2008 4:28 pm by catventure

» TAB Alpha Version 45 Available
Mon Oct 13, 2008 3:24 pm by catventure

» Greater functionality with a time script
Sat Oct 11, 2008 7:50 am by catventure

» TAB Alpha Version 44 Available
Fri Oct 10, 2008 4:09 pm by catventure

» Container Object error
Wed Oct 08, 2008 4:27 pm by catventure

» IF Comp 2008 Entries
Wed Oct 01, 2008 7:19 pm by catventure

 

understanding carriedX

View previous topic View next topic Go down 
AuthorMessage
sandyrepope
Apprentice Adventurer


Gender:MalePiscesRat
Age : 60
Joined : 10 Jun 2008
Posts : 35

PostSubject: understanding carriedX   Thu Jul 31, 2008 9:41 pm

I've looked in the language.txt file and have been trying to understand the carriedX.

Could someone explain how this is to be used?

Thanks
Sandy
Back to top Go down
catventure
Admin Adventurer


Gender:MaleLeoDragon
Age : 56
Joined : 08 Jun 2008
Posts : 132
Location : UK
Humor : Enjoys a laugh!

PostSubject: Re: understanding carriedX   Fri Aug 01, 2008 10:36 am

Hi Sandy,

CONDITIONS

carriedX
notcarrX

Check if a particular object is carried by player or not carried by player

X = object number

Object 5 = a sword

Character 1 = a creature

Example usage:

attack creature with sword#charpresent1#carried5[acts]cmessYou swing the sword and swiftly decapitate the creature. It is dead.#charloc1=0#else#charpresent1#notcarr5[acts]cmessBut you aren't holding a sword![end]

This translates as:
IF character 1 (the creature) is present AND the sword is carried THEN kill the creature and remove it from game (set its location to 0) ELSE IF the creature is here but the sword is not carried THEN tell the player via a cmess action...

There are also companion commands:

objlocn1=carried - is objn1 carried?
objlocn2=carried
objlocn1=notcarried - is objn1 not carried?
objlocn2=notcarried

Here is a further example which could follow the above one:

attack %charn1% with %objn2%#charpresentn1#objlocn2=carried[acts]cmessYou attack %charname1% with the %objn2%. It didn't seem to have any effect...#else#charpresentn1#objlocn2=notcarried[acts]cmessBut you aren't holding a %objn2%![end]

This will trigger if the player tries to attack ANY valid character with ANY valid object providing the character is present and will produce a different reply depending on if the object in question is carried or not carried.

catventure
_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down

understanding carriedX

View previous topic View next topic Back to top 
Page 1 of 1

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