First, you need to implement the 'build' verb, as explained in the
Technical Manual.
Second ... is the player supposed to build a raft out of thin air? Or
are there objects lying around out of which it will be constructed?
Let's suppose the latter. In the location where the objects (logs and
rope?) are located, I would suggested creating an Unthing called Raft.
Something along these lines (untested code):
Unraft: Unthing 'raft' 'raft'
"You don't see any raft here. "
dobjFor(Build) {
verify() {}
check() {
// This traps the possibility that you've built
// a raft and then moved it to another location:
if (realRaft.location != nil)
failCheck('You\'ve already built the raft. ');
}
action() {
local loc = location;
realRaft.moveInto (loc);
"Using the logs and rope, you cobble together a
very serviceable raft. ";
}
}
;
The Unthing is just sitting there, but it will pretend not to be there
(that's what an Unthing is for).
This might need some tinkering, but you'll never have to worry about the
player creating more than one raft, because once the Unthing has been
moved into nil, the Build action won't be possible anymore.
Hope that helps!
--JA
Oops -- I deleted the line of code that moved the Unthing into nil. I
think leaving it in the location is better, because that way it can
still respond if the player builds the raft and then moves it somewhere
else. This code will only get you in trouble if it's possible for the
player to lose or destroy the raft object, because in that case the
location of realRaft would once more be nil. But in that case you might
_want_ the player to be able to build a new raft.
--JA
I am still at the beginning of the learning curve for TADS. The
Unthing seems to be what I need to use but I don't have it in my adv
or know how to define it. Any help would be appreciated.
Warren
It sounds to me like you're using TADS 2. Jim is using TADS 3, so his
solution may not be applicable.
I have posted a new request for help stating that I am using TAD2.
Maybe someone has a different solution