[Newbies] Squeak/eToys manual?
lists at kershaw.org
Thu Jul 6 21:37:39 UTC 2006
Okay, I'm getting somewhere now! I found the 'Holder' object in the
Supplies tab, and have got animation working, so our rabbits can now
look happy, sad or indifferent. The kids are currently learning the
basics of algebra in maths, so I'm going to have them make a pet shop
using their animal and lots of variable manipulation (but not mention
So far I've got two objects, shop & pet:
Shop has variables for:
| money numPets petCost numFoodBags foodBagCost foodPerBag |
Pet has just:
| hunger |
I have scripts for buying food, feeding a pet, buying a pet, each one
checking there's enough money/food/pets before firing, if not sound an
alert. I'm working on having pets grow up after a minute or so and
become sellable, at a profit...
My immediate need is - how do I make the pet into a button that fires
the 'feedPet' script? I've got lots of 'button to fire this script'
buttons to run various actions, but I'd like to have new instances of
each pet appear when purchased, and have random variations of hunger
etc to keep the kids on their toes trying to balance income, food,
selling. The extension would be to have different pets (with different
costs/needs), different foods (affecting each animals hunger
differently) and maybe even extra variables (thirst, hunger,
happiness, etc). I got as far as getting the pet to fire an onMouseUp
event, but didn't know what to put in the dialog (and don't want the
kids touching code if possible - is there a tile way?)
Regards cc'ing posts to the Squeakland list, I thought this WAS the
Squeakland list - am I in the wrong place? Eek!
On 06/07/06, Markus Gaelli <gaelli at emergent.de> wrote:
> On Jul 6, 2006, at 2:57 PM, Markus Gaelli wrote:
> > Make a holder with all colors respectively shapes etc, and change
> > the color respectively let it look like the according color of the
> > shape at the index of that other holder.
> > (Hide that holder if necessary). Change the index of the cursor of
> > that other holder according to the hunger/illness etc.
> Should have been:
> Make a holder with all colors respectively shapes etc, and change the
> color respectively let it look like **** the according shape *** at
> the index (=cursor) of that other holder.
> (Hide that holder if necessary). Change the index of the cursor of
> that other holder according to the hunger/illness etc.
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners