Difference between revisions of "0x0071"

From SimsWiki
Jump to: navigation, search
m (Cleaned up)
(Use)
 
(7 intermediate revisions by 3 users not shown)
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
 +
|-
 +
|0||colspan="2"|The '''Object''' to be snapped. The choices are any of the many [[Sims 2 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 [[Byte Order|low and high order byte]] respectively.
 +
|-
 +
|1 & 2||colspan="2"|Variable number used for '''Object'''
 +
|-
 +
|3||colspan="2"|The '''Target''' for the object to be snapped into. The choices are any of the many [[Sims 2 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 [[Byte Order|low and high order byte]] respectively.
 +
|-
 +
|4 & 5||colspan="2"|Variable number used for '''Target'''
 +
|-
 +
|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?
 +
|}
  
ss - slot number to snap into
+
==Problems?==
 
+
I have had numerous problems with this instruction just not snapping into the provided slot and yet not reporting failure either. I'm not entirely sure why it does it, but sometimes, I just have to revert to using the option to immediately snap into a slot upon [[0x002A|Create New Object Instances (0x002A)]] instead. Not always what you want, but at least provides an alternative.
xx - Not sure about these 2 yet.  the second one may be flags of some kind.
+
 
+
?? - apparently unused
+
 
+
Example:
+
 
+
To snap the stack object 0 into the object in Local Variable 1, using the third slot:
+
 
+
0a 00 00 19 01 00 03 87
+
07 00 00 00 00 00 00 00
+
 
+
Values observed in another objects were used for the unknown opcodes.
+
  
 
==See also==
 
==See also==
 
*[[Primitives]]
 
*[[Primitives]]
 
*[[SimAntics]]
 
*[[SimAntics]]
 
{{OldWikiEntryCleaned}}
 
 
[[Category:Modding]]
 

Latest revision as of 10:54, 24 April 2011

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


Contents

[edit] 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.

[edit] 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 & 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 & 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?

[edit] Problems?

I have had numerous problems with this instruction just not snapping into the provided slot and yet not reporting failure either. I'm not entirely sure why it does it, but sometimes, I just have to revert to using the option to immediately snap into a slot upon Create New Object Instances (0x002A) instead. Not always what you want, but at least provides an alternative.

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox