Difference between revisions of "0x000C"

From SimsWiki
Jump to: navigation, search
(Created page with "{{Primitive |name=Direction |opcode=0x000C |expansion=The Sims 2 }} ==Overview== This primitive provides a way to discover the direction from one object to anothe...")
 
(Use)
 
(4 intermediate revisions by one user not shown)
Line 6: Line 6:
  
 
==Overview==
 
==Overview==
This [[Primitives|primitive]] provides a way to discover the direction from one object to another. The direction is between the object held in the [[Sims 2 Variables#Stack Object|Stack Object]] and a nominated other variable.
+
This [[Primitives|primitive]] provides a way to discover the direction from one object to another. The direction is between the object held in the [[Sims 2 Variables#Stack Object|Stack Object]] and a nominated other variable. The direction is returned as a number whose meaning is shown in the picture.
  
 
==Use==
 
==Use==
Line 13: Line 13:
 
[[Image:BHAVoperands.JPG|thumb|300px|right|Operand editing]]
 
[[Image:BHAVoperands.JPG|thumb|300px|right|Operand editing]]
  
 +
[[Image:DirectionOpCode.jpg|thumb|300px|right|The returned value of direction when not using degrees]]
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
Line 19: Line 20:
 
|0 & 1||colspan="2"|qualifiers on the variable in operand 2.
 
|0 & 1||colspan="2"|qualifiers on the variable in operand 2.
 
|-
 
|-
|2||colspan="2"|Variable to set with the distance between the two objects. 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.
+
|2||colspan="2"|Variable to set with the direction from one object to the other. 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.
 
|-
 
|-
 
|3||colspan="2"|Unused
 
|3||colspan="2"|Unused
Line 29: Line 30:
 
|6 & 7||colspan="2"|qualifiers on the variable in operand 5.
 
|6 & 7||colspan="2"|qualifiers on the variable in operand 5.
 
|-
 
|-
|8 - bit 1||Controls "in degrees"||off: True<br>on: False
+
|8 - bit 2||Controls "in degrees"<br>Note that SimPE reports the use of this bit the wrong way around||off: SimPE says "True", actually means "False"<br>on: SimPE says "False", actually means "True"
 
|-
 
|-
 
|9 thru 15||colspan="2"|Unused
 
|9 thru 15||colspan="2"|Unused
Line 37: Line 38:
 
*[[Primitives]]
 
*[[Primitives]]
 
*[[SimAntics]]
 
*[[SimAntics]]
 +
*[[Sims 2 My|Stack Object's direction]]

Latest revision as of 19:20, 26 November 2011

Direction
OpCode:0x000C
Game Version:The Sims 2


[edit] Overview

This primitive provides a way to discover the direction from one object to another. The direction is between the object held in the Stack Object and a nominated other variable. The direction is returned as a number whose meaning is shown in the picture.

[edit] Use

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

Operand editing
The returned value of direction when not using degrees
Operand Description Operand Values
0 & 1 qualifiers on the variable in operand 2.
2 Variable to set with the direction from one object to the other. 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.
3 Unused
4 - bit 1 When to take the direction from Me or from the variable in operand 5 off: Me
on: operand 5
5 Variable containing the object to find the direction from the Stack Object. 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.
6 & 7 qualifiers on the variable in operand 5.
8 - bit 2 Controls "in degrees"
Note that SimPE reports the use of this bit the wrong way around
off: SimPE says "True", actually means "False"
on: SimPE says "False", actually means "True"
9 thru 15 Unused

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox