This is more of a proto-proto-pattern; an attempt to condense the salient points of IntFicRopeTips.
Here are some things to remember when coding a rope:
- A rope has two ends. This can mean you can implement your rope as two separate objects, or just with two relevant properties. If you're going to have the rope be able to span two rooms, you'll probably want to choose the first. If the rope will usually be in only one room at a time, the second way might be easier.
- A rope needs to know what it's attached to, at least so its description can read "A rope (attached to ______)"
- Often, the attached item also needs to know that it's tied to the rope (and, by extension, to whatever's on the other end of the rope).
- A normal rope should be tieable to itself.
- It will be easier on you if you create an object class 'Tieable' or at least create a flag 'tieable' which you use for tieable objects.
- It will be more fun for the player if they can tie the rope to any old object they come across. However, be wary of such logical impossibilities as "A rope (tied to a shaft of light)."
- In the second case, don't forget about the command 'tie rope to me'.
- A rope is such a useful item, and such a pain to code properly, that you will probably do yourself a favor if you never include it in the first place, or at least limit the area the player can reach with it.
CategoryIntFic
EditText of this page
(last edited August 27, 1997)
FindPage by searching (or browse LikePages or take a VisualTour)