TADS - Direct and Indirect Objects An article by Sue One thing that I found very hard to get to grips with in TADS is the use of direct and indirect objects. Well, it's a long time since I did O Level English! Say you want the player to be able to dig in a patch of earth with a fork and find an earthworm. Unless you put specific code in the sections for both the earth and the fork, 'dig earth with fork' won't work properly. It took me ages to work out how to do it and now I just copy and adapt the code for similar puzzles. Here is an example of the relevant code from my forthcoming (assuming I don't reformat the hard drive and lose the code - again!) game which will, I hope, help anyone else having problems programming something similar. earth: item sdesc = "sticky earth" adesc = {"some "; self.sdesc;} thedesc = {"the "; self.sdesc;} noun = 'earth' 'soil' 'patch' adjective = 'sticky' isListed = nil isdug = nil location = vegpatch ldesc = "It's a rich brown colour, well dug and containing plenty of compost." verDoDigWith(actor,iobj)= { if (fork.location = Me.location) { "You'd better pick up the fork first!"; } else if ((fork.isIn(Me)) and (earth.isdug=true)) { "You dig around a bit more but the worms have got wise to you and stay underground."; } } ; fork: item sdesc = "garden fork" adesc = {"a "; self.sdesc;} thedesc = {"the "; self.sdesc;} noun = 'fork' adjective = 'garden' location = vegpatch isstuckinground = true isListed = nil ldesc = "It is old and quite rusty." verIoDigWith(actor)={} ioDigWith(actor, dobj) = { if (earth.isdug = nil) { "You strike the fork into the earth. It goes in easily. You move a few small clumps of earth to one side and disturb a group of worms. Most wriggle off but one, which looks a bit stunned by the experience, lies motionless on the surface."; worm.moveInto(vegpatch); earth.isdug:=true; incscore(3); } } ; - o -