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 | 
 

 Object is listed as present and not present when applied as On a table is

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: Object is listed as present and not present when applied as On a table is    Fri Mar 18, 2011 5:03 pm

Hi Guys
Just put this in Script one. The idea being when the player enters the location I want them to see that there is a desk in that loacation and item(s) are either there or not

[start]room=2#anyobjs190[acts]cmessThere is a heavy, old mahogany hall stand here. On the stand is:#listobjs190#else#room=2[acts]cmessThere is a very heavy mahogany hall stand here and is clearly very well used. There are no items currently on the stand.[end]

Im using 190 as the table top. The item here is an old lamp but will be anything of a small enough size later.

The issue is when I enter the loacation I get
"There is a heavy, old mahogany hall stand here. On the stand is; a lamp

then I get immeadiatley below

There is a heavy, old mahogany hall stand here.and is clearly well used. There are no items currently on the stand.

Ive checked the code from an example hee in the forum and its all there. Any ideas? Im Stumped...
Gareth


Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Object is listed as present and not present when applied as On a table is    Fri Mar 18, 2011 5:31 pm

Hi Gareth,

OK. I'll have to check this out. Please bear with me whilst I investigate exactly why this occurs that way...

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: Object is listed as present and not present when applied as On a table is    Fri Mar 18, 2011 6:08 pm

No problem Phil...

Just had me scrtaching my head for 3 hours lol
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Object is listed as present and not present when applied as On a table is    Fri Mar 18, 2011 6:38 pm

Ok. I think it just a question of extending/qualifying the logic. Script1 and Script2 work *slightly* different to RESPONSE - because unlike response TAB looks at ALL the entries in these simple tables in case anything is needed to be actioned so you need to be extra specially careful if using #else# in these...

Please try this - it should work now as expected.

[start]room=2#anyobjs190[acts]cmessThere is a heavy, old mahogany hall stand here. On the stand is:#listobjs190#else#room=2#notanyobjs190[acts]cmessThere is a very heavy mahogany hall stand here and is clearly very well used. There are no items currently on the stand.[end]

However, best if you can avoid "#else#" at times completely in Script1/2 event lists. In virtually all cases you can simply enter 2 or more separate entries to cover all eventualities:

[start]room=2#anyobjs190[acts]cmessThere is a heavy, old mahogany hall stand here. On the stand is:#listobjs190[end]

[start]room=2#notanyobjs190[acts]cmessThere is a very heavy mahogany hall stand here and is clearly very well used. There are no items currently on the stand.[end]

If I remember in Amy's game she did not use #else# in Script1 or Script2 at all - but however was used very well and to good effect in RESPONSE entries.

I've edited the incorrect example code you quoted from that other forum thread which was causing the confusion.

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: Object is listed as present and not present when applied as On a table is    Sat Mar 19, 2011 10:58 am

No problem on the other code - always good to find a more effective way around things anyway. I also remember back in the dark agaes something about the #else# causing an issue but I didnt remember where - I think Ill stay with the two entries - that way it will be easier to catch if there are code checking reason

Thanks again phil

Used the 2 seperate script one codes and they work with no issue
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Object is listed as present and not present when applied as On a table is    

Back to top Go down
 

Object is listed as present and not present when applied as On a table is

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: