Newsgroups: rec.arts.int-fiction
Path: gmd.de!jvnc.net!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!msuinfo!atlantic.cps.msu.edu!schwarts
From: schwarts@cps.msu.edu (Steven Eric Schwartz)
Subject: Advsys help
Message-ID: <1992Dec8.040600.9180@msuinfo.cl.msu.edu>
Originator: schwarts@atlantic.cps.msu.edu
Sender: news@msuinfo.cl.msu.edu
Reply-To: schwarts@cps.msu.edu (Steven Eric Schwartz)
Organization: Dept. of Computer Science, Michigan State University
Date: Tue, 8 Dec 92 04:06:00 GMT
Lines: 33

Could someone please explain to me how the following move definition works
for actors in ADVSYS? I am not sure how the include file uses the child and
sibling properties. Thank you in advance.

  (method (move dir &aux obj sib)
    (setq obj (getp self child))
    (while obj
      (setq sib (getp obj sibling))
      (if (setq temp (getp obj tied-to))
          (if (and (!= (getp temp parent) self) (!= temp self)
          (getp temp takeable?))
              (progn
                (send (getp self parent) leave temp dir)
                (message "You drag the " temp " along with you.\n")
              )
              (error2 "You'll have to drop the " obj
                      " or untie it from the " temp
                      " before you can move.\n"
              )
          )
      )
      (setq obj sib)
    )
    (send (getp self parent) leave self dir)
  )



-- 
Steven Eric Schwartz            "It's not safe out here. It's wonderous, with
(schwarts@cps.msu.edu)           treasures to satiate desires both subtle and
125 East Wilson Hall, MSU        gross.  But it's not for the timid."
East Lansing, Michigan  48825                           - Q, "Q Who"
