give this to her
MatCauthon137
21 Mar 2004, 04:34define object <glass>
take {
give <glass>
if not flag <start> then {
speak <Now you need to turn on the water.>
msg <Type "turn on X" where X is the object you wish to activate, in this case, the sink.>
}
}
hidden
give to <Jody>
properties <fillable; drinkable>
action <fill> {
if not flag <waterglass> then {
flag on <waterglass>
if flag <sinkon> then msg <You fill the glass with water.> else msg <There is no running water around here.>
}
else msg <The glass is already full.>
if not flag <firstfill> and here <blackcat1> then {
speak <That looks mighty tasty, take a drink.>
speak <Don't forget to refill it when you're done.>
msg <Type "drink from X" where X is the object you wish to drink from, in this case, the glass.>
flag on <firstfill>
}
else do <drink>
}
action <drink> if flag <waterglass> then {
msg <It tastes really good.>
flag off <waterglass>
}
else msg <The glass is empty.>
end define
define object <Jody>
speak if not flag <start> and not got <glass> and ( %chores% < 2 ) then {
say <Go and get me a glass of water. This is your second chore.>
speak <Meet me in the kitchen.>
move <blackcat1; Kitchen>
}
displaytype <person>
article <her>
gender <she>
give <glass> {
msg <thank you>
lose <glass>
}
end define
give to <Jody> {
move <glass; Jody>
msg <You give the glass to Jody.>
}
MatCauthon137
21 Mar 2004, 17:37define object <Jody>
speak if not flag <start> and not got <glass> and ( %chores% < 2 ) then {
say <Go and get me a glass of water. This is your second chore.>
speak <Meet me in the kitchen.>
move <blackcat1; Kitchen>
}
displaytype <person>
article <her>
gender <she>
give <glass> {
msg <thank you>
lose <glass>
}
end define
But I tried what you said, leaving jody's interaction tag the way it was and editing the glass interaction tag to read,
define object <glass>
take {
give <glass>
if not flag <start> then {
speak <Now you need to turn on the water.>
msg <Type "turn on X" where X is the object you wish to activate, in this case, the sink.>
}
}
hidden
give to <Jody> {
move <glass; Kitchen>
hide <glass>
}
properties <fillable; drinkable>........
there is more there, to finish defining the glass itself, pretty much the same as the original post. But you can see I moved the glass out of the inventory. Yet it still says "Hard as you try you cannot do that."
MaDbRiT
21 Mar 2004, 20:03A quick perusal of the code shows that the glass is defined as "hidden" - and I didn't notice anything (although I admit I only looked quickly) that changes this anywhere else in the code.
In Quest the player cannot interact with hidden objects - so I suspect that is why you are getting the 'you can't do that' responses.
If you want an object not to be visible, but still able to be interacted with, you need to make it INVISIBLE not HIDDEN.
Any help?
Al (MaDbRiT)
MatCauthon137
21 Mar 2004, 21:11Anonymous
22 Mar 2004, 08:02Actually, the glass becomes available when the cupboard is opened. I have that in the cupboard script.
That isn't at all obvious from the code you posted - ah, the perils of only pasting *part* of the relevant code strike again...
Al (MaDbRiT)
MaDbRiT
22 Mar 2004, 08:30Here's a 'hacked about' version of your code dropped into a template to make it a testable piece... I've commented out a lot of the tests just to get back to the core 'give glass functionality.
As it is - the 'give glass' works just fine, you might find that comparing this to your code lets you spot your problem
' Quest 3.5 ASL Template
define game <Game Name>
asl-version <350>
gametype singleplayer
game version <1.0>
game author <Your Name>
game copyright <© 2004 ...>
game info <Enter any additional information about this game here.>
start <Start Room>
end define
define room <Start Room>
look <Description Goes Here>
define object <glass>
take {
give <glass>
' if not flag <start> then {
' speak <Now you need to turn on the water.>
' msg <Type "turn on X" where X is the object you wish to activate, in this case, the sink.>
' }
}
' hidden
' give to <Jody> { '<<< YOU DON'T NEED THIS - THE 'give <Jody>' in the glass
' lose <glass> '<<< OBJECT WILL CAUSE IT NEVER TO BE USED...
' }
properties <fillable; drinkable>
action <fill> {
if not flag <waterglass> then {
flag on <waterglass>
if flag <sinkon> then msg <You fill the glass with water.> else msg <There is no running water around here.>
}
else msg <The glass is already full.>
if not flag <firstfill> and here <blackcat1> then {
speak <That looks mighty tasty, take a drink.>
speak <Don't forget to refill it when you're done.>
msg <Type "drink from X" where X is the object you wish to drink from, in this case, the glass.>
flag on <firstfill>
}
else do <drink>
}
action <drink> {
if flag <waterglass> then {
msg <It tastes really good.>
flag off <waterglass>
}
else msg <The glass is empty.>
}
end define
define object <Jody>
' speak if not flag <start> and not got <glass> and ( %chores% < 2 ) then {
' say <Go and get me a glass of water. This is your second chore.>
' speak <Meet me in the kitchen.>
' move <blackcat1; Kitchen>
' }
displaytype <person>
article <her>
gender <she>
give <glass> {
msg <thank you>
lose <glass>
hide <glass>
}
end define
end define
define text <intro>
Enter intro text here
end define
define text <win>
Enter win text here
end define
define text <lose>
Enter lose text here
end define
Al (MaDbRiT)
MatCauthon137
01 Apr 2004, 03:56Anonymous
01 Apr 2004, 04:54The way to get around this would be to have a 'Give #recipient#' type command, where the command checks if you are 'holding' an object(not just in your inventory, though that would work as well), then if the #recipient# is there, then if the recipient can take the object, move it to them. While at the beginning it may seem less intuitive to have things work like this, it makes more sense eventually as people are going to be 'picking up' things. So give them a semblance of hands, and do it this way.
I'd error check your code right now, but I'm busy drinking, and when not doing that, working. Try and do it my way, guarantee it will work or I'll make it.
P.S. I'm such a badass, that last promise can be held true to most ANYTHING!!! I PWN3D ALL JOO BIOTCHES!!!!1
Anonymous
01 Apr 2004, 06:39Send me the asl if you want - I'll see if I can spot the problem in the 'full# version
Al (MaDbRiT)
(You can get my e-mail address from my profile)
MatCauthon137
01 Apr 2004, 20:28Anonymous wrote:Hi Matcauthon137
Send me the asl if you want - I'll see if I can spot the problem in the 'full# version
Al (MaDbRiT)
(You can get my e-mail address from my profile)
Your e-mail address isn't listed in your profile. You can e-mail me at MatCauthon137@yahoo.com, and then I will have it though.
MaDbRiT
02 Apr 2004, 06:45Your e-mail address isn't listed in your profile.
No it isn't is it -
My website address is - and that has an e-mail link - but whatever, I'll e-mail you momentarily...
Al