0x006D

From SimsWiki
Revision as of 10:53, 24 April 2011 by MogHughson (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Change Material
OpCode:0x006D
Game Version:The Sims 2


Overview

This primitive is used to change the texture and/or mesh of an object. If your object has various different textures, you can switch between them using this instruction. For example, the bills that are delivered to your Sim mailbox have a yellow and red texture and if you don’t pay them on time, this instruction is used to update the texture to be a different coloured one. If your object has more than one mesh, you can switch between them using this instruction. For example, the photo you get from a photo booth, swaps the mesh between desktop frame, wall hanging frame and unframed photo when on the floor.

Using the Instruction Wizard

Change Material Instruction Wizard

This wizard helps you to select the correct objects to pull the texture/mesh from. The texture names are taken from Text List (STR#) resource 0x00000088 (see String Resources for all the different Text List usages).


Adding a Sims Graphic as the material

This is a special use of this instruction that allows you to set the Sims graphic as the material. For this to work, the Node Version of the Change Material instruction must be 0x01 (see BHAV Instruction Versioning) which makes the object unable to be Base Game compatible.

To do this you need to set up the following temporary variables prior to issuing the instruction.

Temp:n Value
0 Neighbor ID of Sim whose graphic you wish to use.
1 Literal 0
2 0 = Normal Expression (same with any number other than 1 in fact)
1 = Angry/Hateful Expression (used on hate letter – after bad date)

Upon return of this instruction Temp:4 and Temp:5 contain the GUID of the picture.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox