LESSON 4 - Part 1:  Graphic States, Sprites & Draw Groups

The technique for switching object graphics was originated by Candall (Candlelight Sims). Most people erroneously refer to the technique as “changing the colors of an object while in the game”. Since Candall’s first “color changing” object first emerged on the scene, many of us have contributed to the original code and unlike the sometimes-funky objects we used to get, ours today work rather well.

The only drawback is that objects of more than one tile cannot be processed correctly – at least not yet. I’ve been working on modifying the technique for several months now, and while I’m close – I still have a few bugs to work out.

Multiple Pet Beds

Today we are going to learn about the technique and to start we will be applying it to a Pet Bed. When we are done, players will be able to click on the bed while playing the game and choose the color of their choice for their pet’s bed. Our finished product will allow players to choose from these beds:


Aren't they the most beautimus pet beds you ever did see? The last one reminds me of a grasshopper.

We will be working with the Unleashed Pet Bed. If you do not have Unleashed installed, then select a chair or another 1-tile object from the game and work with that object instead.

Using Tmog, scroll to petbed and clone “Pet – Bed – Medium”. Name it classmultipetbed.iff and identify it as your object somehow. Close Tmog, and then open IFF.