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!
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 Simple way of restricting the "placing" or "dropping" on to a Noun

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

Simple way of restricting the "placing" or "dropping" on to a Noun Empty
PostSubject: Simple way of restricting the "placing" or "dropping" on to a Noun   Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeMon Sep 19, 2011 1:03 pm

Hi Phil and friends...

Just had one of my - how do I do.... moments, read the manuals and delved in to examples but Im not quite there.

Im using this code for accepting the player to drop x on to a cooker (in this case) - I did plan that the ccoker will have a small but neat little puzzle for the game

The code is;

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

No this code and the examine and get code work fine with no issues but as its a cooker I want to restrict some items and allow some (hope that garble is clear?) Ive thought about using the size and weights to do this and yes they do work but there will be items in the carrying game that are the same as the allowable obs. - e.g. I want the copper pan to go on the cooker and be used but a wooden item will burn and I dont want that to have to code against.

is there a simple add to this or do you think its beter to stear away from to much minute detail and basically force size/weights to restrict and accept that some items may be placed there with some obvious consequences?
G
Back to top Go down
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 72
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Simple way of restricting the "placing" or "dropping" on to a Noun Empty
PostSubject: Re: Simple way of restricting the "placing" or "dropping" on to a Noun   Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeMon Sep 19, 2011 6:59 pm

Hi Gareth,

My first thought is that you could have ONLY the objects that could be allowed to be placed on the cooker all have the SAME WEIGHT....

For instance if allowable objects on the cooker all had a weight value of 2

No other objects in the game therefore could have the that value - only the set of objects that could be placed on the cooker....

And then you could do:

[start]drop %objn1% on cooker#room=22#objlocn1=here#objn1size=2[acts]cmessYou place the %objn1% on the cooker..#objlocn1=204#else#room=22#objlocn1=here#or_objn1size<2#or_objn1size>2[acts]cmessThe %objn1% is not something you would put on a cooker![end]

'========

My other suggestion is to place another entry ABOVE your original that deals with the objects that lie within the acceptable weight range but are not meant to be put on the cooker for various reasons:

[start]drop %objn1% on cooker#room=22#objlocn1=here#objn1size<=2#objn1<>x#objn1<>x#objn1<>x#objn1<>x#....etc...[acts]cmessThe %objn1% is not an appropriate object to place on the cooker, I'm afraid![end]

rem: you have several #objn1<>x# conditions..
x being the numbers of ALL the several objects which ARE allowed on the cooker

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

However I think my first idea was probably better...?! Surprised

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

Simple way of restricting the "placing" or "dropping" on to a Noun Empty
PostSubject: Re: Simple way of restricting the "placing" or "dropping" on to a Noun   Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitimeTue Sep 20, 2011 7:38 pm

HI Phil.

Yes I think Op 1 is the best as it appears to be the least labour intensive and of course less code to mistype and have to debug. Just thought Id ask incase there was a more simplisting and new way of restricting.

Thanks again

Gareth
Back to top Go down
Sponsored content




Simple way of restricting the "placing" or "dropping" on to a Noun Empty
PostSubject: Re: Simple way of restricting the "placing" or "dropping" on to a Noun   Simple way of restricting the "placing" or "dropping" on to a Noun I_icon_minitime

Back to top Go down
 

Simple way of restricting the "placing" or "dropping" on to a Noun

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: