Difference between revisions of "0x0071"

From SimsWiki
Jump to: navigation, search
m (adding new primative category tag)
Line 1: Line 1:
This primitive allows objects/sims to be snapped into each other's slots.  This is used for accessories, as well as for objects.  When an accessory is on a sim, it is in one of their [[BodySlots|Body Slots]].  When a sim is sleeping on a bed, the sim is snapped into the bed's slot.
+
{{Primitive
 +
|name=Snap Into
 +
|opcode=0x0071
 +
|expansion=The Sims 2
 +
}}
  
 
==Overview==
 
==Overview==
 +
This [[Primitives|primitive]] allows objects/sims to be snapped into each other's slots. This is used for accessories, as well as for objects. For example. when an accessory is on a sim, it is in one of their [[BodySlots|Body Slots]]; or when a sim is sleeping on a bed, the sim is snapped into the bed's slot.
  
AA aa aa BB bb bb ss xx
+
==Use==
xx ?? ?? ?? ?? ?? ?? ??
+
There is no instruction wizard for this instruction, so the following table details the meaning of each of the operands.
  
AA - data owner of object to snap
+
[[Image:BHAVoperands.JPG|thumb|300px|right|Operand editing]]
aa - value of data owner of object to be snapped
+
  
BB - data owner of object to snap into
+
{| class="wikitable"
bb - value of data owner of object to be snapped into
+
|-
 
+
!Operand!!Description!!Operand Values
ss - slot number to snap into
+
|-
 
+
|0||colspan="2"|The '''Object''' to be snapped. The choices are any of the many [[variables|variables and attributes]] that are part of [[SimAntics]]. Where the variable type can have many of them, e.g. Local variables, operands 1 and 2 give the low and high order byte respectively.
xx - Not sure about these 2 yet.  the second one may be flags of some kind.
+
|-
 
+
|1||colspan="2"|Variable number used for '''Object'''
?? - apparently unused
+
|-
 
+
|2||colspan="2"|Variable number used for '''Object'''
==Example==
+
|-
 
+
|3||colspan="2"|The '''Target''' for the object to be snapped into. The choices are any of the many [[variables|variables and attributes]] that are part of [[SimAntics]]. Where the variable type can have many of them, e.g. Local variables, operands 4 and 5 give the low and high order byte respectively.
To snap the stack object 0 into the object in Local Variable 1, using the third slot:
+
|-
 
+
|4||colspan="2"|Variable number used for '''Target'''
0a 00 00 19 01 00 03 87
+
|-
07 00 00 00 00 00 00 00
+
|5||colspan="2"|Variable number used for '''Target'''
 
+
|-
Values observed in another objects were used for the unknown opcodes.
+
|6||colspan="2"|Slot number
 +
|-
 +
|7 & 8||colspan="2"|Unused?
 +
|-
 +
|9 - bit 1||Slot number provided in Temp 0x0000||off: Slot number is in Operand 6<br>on: Slot number is in Temp 0x0000
 +
|-
 +
|9 - bit 2||Controls “TEST ONLY”||off: False<br>on: True
 +
|-
 +
|9 - bit 3||Controls “Reset root bones”||off: False<br>on: True
 +
|-
 +
|10 thru 15||colspan="2"|Unused?
 +
|}
  
 
==See also==
 
==See also==
 
*[[Primitives]]
 
*[[Primitives]]
 
*[[SimAntics]]
 
*[[SimAntics]]
 
{{OldWikiEntryCleaned}}
 
 
[[Category:Modding]]
 
[[Category:Primitives|{{PAGENAME}}]]
 

Revision as of 15:49, 29 December 2009

Snap Into
OpCode:0x0071
Game Version:The Sims 2


Overview

This primitive allows objects/sims to be snapped into each other's slots. This is used for accessories, as well as for objects. For example. when an accessory is on a sim, it is in one of their Body Slots; or when a sim is sleeping on a bed, the sim is snapped into the bed's slot.

Use

There is no instruction wizard for this instruction, so the following table details the meaning of each of the operands.

Operand editing
Operand Description Operand Values
0 The Object to be snapped. The choices are any of the many variables and attributes that are part of SimAntics. Where the variable type can have many of them, e.g. Local variables, operands 1 and 2 give the low and high order byte respectively.
1 Variable number used for Object
2 Variable number used for Object
3 The Target for the object to be snapped into. The choices are any of the many variables and attributes that are part of SimAntics. Where the variable type can have many of them, e.g. Local variables, operands 4 and 5 give the low and high order byte respectively.
4 Variable number used for Target
5 Variable number used for Target
6 Slot number
7 & 8 Unused?
9 - bit 1 Slot number provided in Temp 0x0000 off: Slot number is in Operand 6
on: Slot number is in Temp 0x0000
9 - bit 2 Controls “TEST ONLY” off: False
on: True
9 - bit 3 Controls “Reset root bones” off: False
on: True
10 thru 15 Unused?

See also

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox