I’m trying to implement this Inform 7 code in TADS 3:
Instead of throwing the meat at the dragon:
Say "The dragon catches the meat and runs off to eat it.";
Move the meat into the dragon;
Move the dragon into nowhere;
or something like that (I don’t really know exactly what code to use in Inform). How do I do this?
iobjFor(ThrowAt)
{
action()
{
if (gDobj == meat)
{
"The dragon catches the meat and runs off to eat it. ";
meat.moveInto(nil);
dragon.moveIntoForTravel(nil);
exit;
}
else
{
inherited();
}
}
}
throwHitFallMsg = 'The dragon sniffs at {the dobj/him} and turns its head
away scornfully. '
;[/code]
The important part of the code is the “action()” method. The “throwHitFallMsg” gives a message for throwing something other than the meat at the dragon.