Difference between revisions of "0x000B"

From SimsWiki
Jump to: navigation, search
 
(Overview)
Line 6: Line 6:
  
 
==Overview==
 
==Overview==
This [[Primitives|primitive]] provides a way to discover the distance between two objects, handy for finding the nearest desk for example. The discovered distance is always placed in a [[Sims 2 Temp|temporary variable]] and the distance is between the object held in the [[Sims 2 Variables#StackObject|Stack Object]] and a nominated other variable.
+
This [[Primitives|primitive]] provides a way to discover the distance between two objects, handy for finding the nearest desk for example. The discovered distance is always placed in a [[Sims 2 Temp|temporary variable]] and the distance is between the object held in the [[Sims 2 Variables#Stack Object|Stack Object]] and a nominated other variable.
  
 
==Use==
 
==Use==

Revision as of 17:25, 11 August 2010

Distance
OpCode:0x000B
Game Version:The Sims 2


Overview

This primitive provides a way to discover the distance between two objects, handy for finding the nearest desk for example. The discovered distance is always placed in a temporary variable and the distance is between the object held in the Stack Object and a nominated other variable.

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 & 1 qualifiers on the temporary variable
2 Variable containing the object to find the distance away 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 3 and 4 give the low and high order byte respectively.
3 & 4 qualifiers on the variable in operand 2.
5 - bit 1 Unused
5 - bit 2 Controls "in 1/100ths tile" off: False
on: True
6 thru 15 Unused

See also

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox