Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New IF writer wants to "Build raft"

1 view
Skip to first unread message

Warren

unread,
Apr 22, 2008, 4:43:12 PM4/22/08
to
I am a new IF writer using TADS. I would like to be able to type in
the command "Built raft" without the raft being at the current
location. I have tried making the raft a floatingItem and put in
location = { return parserGetMe().location;}
locationOK = true
under raft. However, when the raft is left behind and the player wants
to
"Build raft" again,I don't know how to program this.
Is there a better approach to this problem?
Thanks,
Warren

S. John Ross

unread,
Apr 22, 2008, 8:40:18 PM4/22/08
to
The TADS guys will chime in with actual assistance soon, but in the
meantime let me just say that any game where you get to build a raft
sounds cool already :)

Jim Aikin

unread,
Apr 22, 2008, 10:20:28 PM4/22/08
to

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

Warren

unread,
Apr 23, 2008, 1:00:19 PM4/23/08
to
Jim,
That sounds just like what I need. I will try it.
You even recognized the items ( rope and logs ) that I was going to
use!
Thanks,
Warren

Jim Aikin

unread,
Apr 23, 2008, 3:51:07 PM4/23/08
to

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

Warren

unread,
Apr 24, 2008, 3:56:57 PM4/24/08
to
> --JA- Hide quoted text -
>
> - Show quoted text -

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

Khelwood

unread,
Apr 24, 2008, 4:05:28 PM4/24/08
to

It sounds to me like you're using TADS 2. Jim is using TADS 3, so his
solution may not be applicable.

Warren

unread,
May 11, 2008, 9:18:06 PM5/11/08
to
> solution may not be applicable.- Hide quoted text -

>
> - Show quoted text -

I have posted a new request for help stating that I am using TAD2.
Maybe someone has a different solution

0 new messages