define object <crazy man>
alt <crazy; man>
look <A very crazy man is dancing in front of you pulling his hair out. Other than that, you see nothing peculiar.>
take msg <You'd prefer not to carry around a crazy man.>
examine <Upon closer examination of the crazy man, you notice he has a pierced ear and a tanline on his finger.>
prefix <a>
gender <he>
give <earring> {
msg <You give the crazy man the earring and he pops it in his ear.>
lose <earring>
hide <earring>
give <success item1>
if got <success item1> and got <success item2> then playerwin
}
give <wedding band> {
msg <You give the wedding band to the crazy man and he puts it on.>
lose <wedding band>
hide <wedding band>
give <success item2>
if got <success item1> and got <success item2> then playerwin
}
end define
define object <crazy man>
alt <crazy; man>alt <man>
look <A very crazy man is dancing in front of you pulling his hair out. Other than that, you see nothing peculiar.>
take msg <You'd prefer not to carry around a crazy man.>
examine <Upon closer examination of the crazy man, you notice he has a pierced ear and a tanline on his finger.>
prefix <a>prefix <the>
gender <he>
give <earring> {
msg <You give the crazy man the earring and he pops it in his ear.>
lose <earring>
hide <earring>
give <success item1>
if got <success item1> and got <success item2> then playerwin
}
give <wedding band> {
msg <You give the wedding band to the crazy man and he puts it on.>
lose <wedding band>
hide <wedding band>
give <success item2>
if got <success item1> and got <success item2> then playerwin
}
end define
gender <he>
give <earring> {
msg <You give the crazy man the earring and he pops it in his ear.>
lose <earring>
hide <earring>
flag on <successItem1>
if (flag <successItem1> = True) and (flag <successItem2> = True) then playerwin
}
give <wedding band> {
msg <You give the wedding band to the crazy man and he puts it on.>
lose <wedding band>
hide <wedding band>
flag on <successItem2>
if (flag <successItem1> = True) and (flag <successItem2> = True) then playerwin
}
end defineAlex wrote: Flags: Yes, flags would be better for this, but the inventory approach should work just as well really, the only pain being that you have to remember to set all these objects as hidden.
Run Time Error '5': Invalid procedure call or argument Alex wrote:Thanks for reporting the run-time error - I'll take a look into it.
As for the "Hard as you try..." message, that's from Q3EXT so nothing to do with me guv!
I clicked the earring and the wedding band as the two giveable objects. That's not Q3ext, is it? Or were you referring to the error message itself was from Q3ext?
Anyway, using typelib, is there a good approach to making a giveable object? Is it something that must be dealt with inside the object or is it dealt with the person to whom it will be given to?
Strike that! I figured it out on my own. That rocks! However, another question arises. I tried to figure it out on my own but to no avail.
The actor is a female. How do I make it respond as one?
I give the girl a sweater and when I examine her, I get the description that I gave for her “This looks like a wee girl of age 19†plus an additional line that says “He is carrying a sweaterâ€
I could not find an option to change that response to ‘she’
A more complicated question would be what if I want the girl to put it on as soon as I give it to her? Is there a way to change the reply to “She is wearing a sweater?†If not, that’s ok. It just gets more complicated if I want her to wear something and carry something else. “She is wearing a sweater and carrying a frog.â€
The latter question is not as important so if it’s too difficult to worry about, that’s fine.
' "sweater"
' Created with QDK Pro 3.52
!include <Typelib.qlb>
define game <sweater>
asl-version <350>
gametype singleplayer
start <demo room>
game author <MaDbRiT>
game info <Created with QDK Pro 3.52>
end define
define synonyms
end define
define room <demo room>
define object <jenny>
look <Jenny is a very attractive young lady.>
displaytype <person>
type <TLTcontainer>
type <TLTactor>
properties <listHeader=She is carrying>
action <speak> say <does my bum look big in this?>
end define
define object <frog>
displaytype <amphibian>
gender <it>
type <TLTobject>
type <TLTcontainable>
end define
define object <sweater>
type <TLTobject>
type <TLTcontainable>
action <contained> {
if (#sweater:isIn#=jenny) then {
msg <"Thanks a lot its lovely" |n(Jenny immediately puts the sweater on.)>
move <sweater;limbo>
property <jenny;listHeader=She is wearing a sweater and carrying>
}
else msg <O.K.>
}
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define