[this was posted to rec.games.int-fiction, but it clearly belongs here]
>I'd like to have the player have a certain object with him at the start of
>the game. How do I do this in Inform 5.5?
>
>Also, how do I code a bag of jelly beans? let's say there are 30 jelly
>beans in a small paper sack, and they are edible. How would I do this?
I've just started learning Inform, and I'm curious about the answer to the
second question. The first question is easy enough: simply put a line in the
Initialise block that says "move name_of_object to player;". But as an
exercise I started working on the second question, and I've come up blank. I
can get the bag to contain one jelly baby, but no more than that, even if I
give it "with number 30". I've tried trapping actions by the player with a
before block, but I can't manage the variables well-enough to satisfy the
compiler.
Surely one doesn't need to declare a Class JellyBaby and enumerate each and
every jelly baby (all 30 of them!)? My husband, the systems programming guru,
doesn't think that would be so very inelegant, but what if the bag contains 75
objects, or 100? It gets rather unwieldy. Surely there's an elegant solution
to this?
Anybody know?
:)
bonni
__ __
IC | XC | bonni mierzejewska "The Lone Quilter"
---+--- | u6ed4@wvnvm.wvnet.edu
NI | KA | Kelly's Creek Homestead, Maidsville, WV