You betcha. I did something similar in a couple of cases: I created a
break_desc token to be run when a breakable object is broken and a
data_desc to be run when a data object is placed within something like a CD-ROM.
Here's a quick way to whip it up:
1) Place
property memory_descript below your #includes, in your main gamename.hug file. Actually, you probably want to put an
attribute rememberable in there as well, as it makes things easier later on.
2) For objects that you wish to have the character be able to recall, just put in something for that like you would long_desc. For example:
Code: Select all
LightRoom Basement "Basement"
{
is rememberable
long_desc
{
"It's your basement! Oh no, it's flooded!"
}
memory_desc
{
"You recall all the adventures of your basement and tug up on your pant legs in memory."
}
}
3) OK, now you want to create a verb for "remember."
Code: Select all
verb "remember"
* DoVague
* rememerable DoRemember
4) Lastly, just make the following routine:
Code: Select all
routine DoRemember(object)
{
run object.memory_desc
}
I think that the object will get passed to you automatically from the verb definition. If it doesn't, you'd want to change the above line to * rememberable DoRemember(object) but I am pretty sure that's not necessary.
Let me know if any of this seems unclear. I'd be happy to whip up a fully-compilable example source for you.
Robb
You betcha. I did something similar in a couple of cases: I created a
[color=lightblue]break_desc[/color] token to be run when a breakable object is broken and a [color=lightblue]data_desc[/color] to be run when a data object is placed within something like a CD-ROM.
Here's a quick way to whip it up:
1) Place [color=lightblue]property memory_descript[/color] below your #includes, in your main gamename.hug file. Actually, you probably want to put an [color=lightblue]attribute rememberable[/color] in there as well, as it makes things easier later on.
2) For objects that you wish to have the character be able to recall, just put in something for that like you would long_desc. For example:
[code]LightRoom Basement "Basement"
{
is rememberable
long_desc
{
"It's your basement! Oh no, it's flooded!"
}
memory_desc
{
"You recall all the adventures of your basement and tug up on your pant legs in memory."
}
}
[/code]
3) OK, now you want to create a verb for "remember."
[code]verb "remember"
* DoVague
* rememerable DoRemember
[/code]
4) Lastly, just make the following routine:
[code]
routine DoRemember(object)
{
run object.memory_desc
}
[/code]
I think that the object will get passed to you automatically from the verb definition. If it doesn't, you'd want to change the above line to * rememberable DoRemember(object) but I am pretty sure that's not necessary.
Let me know if any of this seems unclear. I'd be happy to whip up a fully-compilable example source for you.
Robb