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!
multiple objects on a static object I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
multiple objects on a static object I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
multiple objects on a static object I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
multiple objects on a static object I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
multiple objects on a static object I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
multiple objects on a static object I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
multiple objects on a static object I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
multiple objects on a static object I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
multiple objects on a static object I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 multiple objects on a static object

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

multiple objects on a static object Empty
PostSubject: multiple objects on a static object   multiple objects on a static object I_icon_minitimeMon May 24, 2010 8:22 pm

Hi Guys
Just trying out a some code and got a bit stuck.
I have a farmhouse table - its in noun only not in the object list - its static and wont be moved

I have to build a small puzzle around the items on the table (heres the sticking point).
Basically there will be 2 items on the table with the potential of 2 others being placed there by the player.

On the table is - A jug and a bowl

When examining the table Ive got this working for first individual item in the response table which is the Bowl. I need to be able to respond to 3 variants
1 - Its a farmouse table with a bowl on it
2 - Its a farmhouse table with a jug on it
3 - Its a farmhouse table with a bowl and jug on it


I tried (in response)
[start]examine table#room=3#objloc198=0#[acts]cmessIt`s just a big, well used farmhouse table with a bowl on it.[end]

[start]examine table#room=3#objloc197=0#[acts]cmessIt`s just a big, well used farmhouse table with a milk jug on it.[end]

Of course as said its its the first and stops and I cannot find the correct programming example to to options 1,2 and 3. Any ideas??

G
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

multiple objects on a static object Empty
PostSubject: Re: multiple objects on a static object   multiple objects on a static object I_icon_minitimeTue May 25, 2010 9:38 am

Hi Gareth,

One way would be to set an UNUSED LOCATION to hold the objects which are set to be ON the static table object. Then you could go to the Objects Editor and flag the jug and bowl objects to initially start in that non-existing undescribed room....

Say for example you chose location 100 to be the SURFACE location of the table.
You will thus set the bowl and jug (and any others required) to start at this location 100.
When the player examines the table at any time which is always in room 3 you can then show a custom message followed by a "listobjsX" action which will disclose which items are presently upon it like so:


General purpose examine message for table
=============================
[start]examine table/look on table#room=3#anyobjs100[acts]It is a small mahogany table. On the table is:#listobjs100#else#room=3[acts]cmessIt is a small mahogany table. There are no items currently on the table.[end]

You could also ensure that only objects in a particular size range may be placed onto the table... for example smallish objects with a low size value in the Object Editor...

Now if the player wants to GET an object which is on the table:

[start]get %objn1% off table#room=3#objlocn1=100[acts]cmessYou take the %objn1% from the table.#objlocn1=501[end]

Or if you just want them to be able to get it without typing "off table" then place another "get %objn1%" response entry BEFORE the standard default one like so:

[start] get %objn1%#room=3#objlocn1=100[acts]cmessYou pick up the %objn1%.#objlocn1=501[end]

(If the player types "get jug" in room 3 and the jug is ON the table - at loc 100 - then place the jug from loc 100 to the player's carried inventory. Otherwise carry on in response and go and do the normal "get %objn1% entry to give appropriate action reply...)

[start]drop %objn1% on table#room=3#objlocn1=here[acts]cmessYou place the %objn1% on to the table...#objlocn1=100[end]

This allows player to drop (synonym of PUT) an object which is carried, worn or in room on to the table (loc 100)

If you want to limit the size of object which can go on to the table then simply add in a object size condition check:

objn1size [ >= | <= | <> | > | < | = ] X
Example: "objn1size<=2"
Is the object less than or equal to an object size of 2?

[start]drop %objn1% on table#room=3#objlocn1=here#objn1size<=2[acts]cmessYou place the %objn1% on to the table...#objlocn1=100#else#room=3#objlocn1=here#objn1size>2[acts]cmessThe %objn1% is too large or bulky to fit on the table I'm afraid![end]

In that entry the player cannot put just any object but only certain objects (determined by the size value in this example) on to the table - so you can effectively limit what the player is allowed to place there.

You might also decide to put an entry into Script One (printed after the location description is shown) such as:

Script One entry
===========

[start]room=3#anyobjs100[acts]cmessOn the table is:#listobjs100#else#room=3#notanyobjs100[acts]cmessThere is nothing presently on top of the table.[end]

That is appended to follow the location text each time the player visits or redescribes ("look") the room.

Hope this helps,

Phil.


Last edited by catventure on Fri Mar 18, 2011 6:44 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

multiple objects on a static object Empty
PostSubject: Re: multiple objects on a static object   multiple objects on a static object I_icon_minitimeTue May 25, 2010 8:27 pm

Phil..................................... That reply was fantastic. Exactly what I need and now seeing it in the Unused location situation it make great sense.

Just as an added thought on this - regarding size and weights of objects.

is there a table/guide/advice that can be used to estimate what could be set against objects to give a good propotion s in weight and size ?

I didnt see one in the html sections of the site - or did I miss them ?

Thanks again Phil
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

multiple objects on a static object Empty
PostSubject: Re: multiple objects on a static object   multiple objects on a static object I_icon_minitimeTue May 25, 2010 9:02 pm

garethfx wrote:

Is there a table/guide/advice that can be used to estimate what could be set against objects to give a good propotion s in weight and size ?

Hi Gareth. There is no specific rules or tables, but you could decide before hand that objects which had a size value of say 2 only could be objects allowed to be put on the table and then check for them that way or you could even add in weight checks too... but best to keep it fairly simple. If you want to be sure they don't try and put a certain object on to it you could add in condition(s) such as #or_objn1<>7#or_objn1<>10# etc..

Best wishes,
Phil.
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

multiple objects on a static object Empty
PostSubject: Re: multiple objects on a static object   multiple objects on a static object I_icon_minitimeTue May 25, 2010 9:22 pm

good stuff . Thats fine. I suppose its a bit restrictive when actually setting size/weights against things, even as a guideas after I posted the question I thought about giants and fairy objects - a cup is a cup but in different worlds the size is relative....
Back to top Go down
Sponsored content




multiple objects on a static object Empty
PostSubject: Re: multiple objects on a static object   multiple objects on a static object I_icon_minitime

Back to top Go down
 

multiple objects on a static object

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: