making more instances of objects in scripting

Karl Ramberg karl.ramberg at
Tue Dec 26 08:24:26 UTC 2000

Scott Wallace wrote:
> Karl,
> Look in the "miscellaneous" category in bullet's viewer to find
> "bullet's copy", which, when invoked, will give you another instance
> of the bullet.  And look in the "collections" category of your
> playfield's viewer to find "playfield append:", which, when executed,
> will append the parameter you provide to the list of objects in the
> playfield.  A simple version of what you want can be achieved by
> constructing a script of the form
>         playfield append: bullet's copy
> Depending on what you want to do, you may wish to put the copied
> bullet into a player-valued instance variable of, perhaps, the
> playfield, so that you can send it various messages to configure it
> as needed before turning it loose in the playfield.

I can't assign the bullet's copy to the instance variable. :-(
> Hope this helps,
>    -- Scott
>    At 5:48 PM +0100 12/25/00, Karl Ramberg wrote:
> >Hi
> >I'm trying to make a SpaceWar game a la the one
> >Alan Kay describes in How Spacewar on Bobs SuperSwiki.
> >I'm doing this with morphic scripting tiles and wonder
> >how to make bullets. I would like to make one bullet
> >and every time one is fired the original bullet will
> >copy it self and the copy will shoot off.
> >But I can't find a way to make a copy instance of a
> >bullet...
> >Any suggestions ?
> >
> >Karl

More information about the Squeak-dev mailing list