Kristopher Neidecker
2007-04-22 02:35:06 UTC
I am new to this group and figured I would say hi to all the various IF
writers here before throwing any questions around :)
So...Hello! I have been diving into many of the great IF creations listed
in Bafs Guide and the IF Comp lists and I give my respect to each and every
one of you.
Now my question is probably elementary but I cannot find any info in the
docs for it. I used to play around with Inform 6 about 5 years back or
more, and loved it, but never really sat down to work on anything but little
tests and putter around a bit. I found Inform 7 recently and was blown
away. I am working on a project now (::insert collective sigh over another
first Inform project Oo ::) and have run into one thing I cant seem to
figure out compared to Inform 6. In 6 I was able to dynamically create
items, and dynamically destroy them, so 1 prototype grain of sand turned
into an infinite pile of sand, etc. Like:
****
Class sand(200)
with name "sand" "grain",
short_name "Grain of sand",
initial "You see a grain of sand",
plural "Grains of sand",
create
[ x; move self to beach;
],
destroy
[ x;
],
after
[x; Take: sand.create();
Drop: sand.destroy(self); print "You loose the sand.^";rtrue;
];
****
That is not a real good use for it but there it is anyway. So you could use
one prototype monster and spawn him where needed.
So is there a way to do this through native 7 code or will I need to dip
into 6 code to replicate this? I could make a stack of 50 or 100 objects
and move them into play when I needed to or some sort of work-around, but
that is inefficient to the max for a larger game, with a bunch of
randomization or something similar. Thanks for the help.
writers here before throwing any questions around :)
So...Hello! I have been diving into many of the great IF creations listed
in Bafs Guide and the IF Comp lists and I give my respect to each and every
one of you.
Now my question is probably elementary but I cannot find any info in the
docs for it. I used to play around with Inform 6 about 5 years back or
more, and loved it, but never really sat down to work on anything but little
tests and putter around a bit. I found Inform 7 recently and was blown
away. I am working on a project now (::insert collective sigh over another
first Inform project Oo ::) and have run into one thing I cant seem to
figure out compared to Inform 6. In 6 I was able to dynamically create
items, and dynamically destroy them, so 1 prototype grain of sand turned
into an infinite pile of sand, etc. Like:
****
Class sand(200)
with name "sand" "grain",
short_name "Grain of sand",
initial "You see a grain of sand",
plural "Grains of sand",
create
[ x; move self to beach;
],
destroy
[ x;
],
after
[x; Take: sand.create();
Drop: sand.destroy(self); print "You loose the sand.^";rtrue;
];
****
That is not a real good use for it but there it is anyway. So you could use
one prototype monster and spawn him where needed.
So is there a way to do this through native 7 code or will I need to dip
into 6 code to replicate this? I could make a stack of 50 or 100 objects
and move them into play when I needed to or some sort of work-around, but
that is inefficient to the max for a larger game, with a bunch of
randomization or something similar. Thanks for the help.