home *** CD-ROM | disk | FTP | other *** search
- property spriteNum
-
- on new me
- return me
- end
-
- on appear me, myPos, myMember, myColour, mySpriteNum, myInk
- if mySpriteNum = 0 then
- set spriteNum to findSpace(me)
- else
- set spriteNum to mySpriteNum
- end if
- if spriteNum > 0 then
- puppetSprite(spriteNum, 1)
- set the foreColor of sprite spriteNum to 255
- set the ink of sprite spriteNum to myInk
- set the loc of sprite spriteNum to myPos
- set the memberNum of sprite spriteNum to member myMember
- set the foreColor of sprite spriteNum to myColour
- else
- abort()
- end if
- end
-
- on findSpace me
- repeat with x = 1 to 48
- if the memberNum of sprite x = 0 then
- return x
- exit repeat
- end if
- end repeat
- return 0
- end
-
- on destroy me
- set the memberNum of sprite spriteNum to 0
- set pos to getPos(the actorList, me)
- deleteAt(the actorList, pos)
- return me
- end
-