making more instances of objects in scripting

Karl Ramberg karl.ramberg at chello.se
Tue Dec 26 12:44:59 UTC 2000



Robert Hirschfeld wrote:
> 
> Hi Karl,
> 
> Karl Ramberg wrote:
> [...]
> > > 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. :-(
> 
> It works if you change the instance variable's data type to Player
> before.

I looked around but could not find a way to change the variable's 
data type...

Anyway, the project is at Bobs SuperSwiki,  
http://209.143.91.36/super/ , it's called SpaceWar.
Best accessed with a 2.9a image and either the FileList or
the ProjectNavigatorMorphs Find button.
It would be cool if you or anybody messed around with it :-)
There is lots of issues about the scripting I don't 
know about, and I find the easiest way to learn is
to seeing how it's done.

Karl





More information about the Squeak-dev mailing list