Difference between revisions of "0x0010"
MogHughson (Talk | contribs) (→Use) |
MogHughson (Talk | contribs) (→Use) |
||
Line 53: | Line 53: | ||
|3 - bit 8||NW | |3 - bit 8||NW | ||
|- | |- | ||
− | |4||colspan="2"|Variable containing object to '''Find Location For'''. 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 5 and 6 give the low and high order byte respectively. | + | |4||colspan="2"|Variable containing object to '''Find Location For'''. 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 5 and 6 give the [[Byte Order|low and high order byte]] respectively. |
|- | |- | ||
|5 & 6||colspan="2"|qualifiers on the variable from operand 4, eg. Local(0xnnnn) | |5 & 6||colspan="2"|qualifiers on the variable from operand 4, eg. Local(0xnnnn) | ||
|- | |- | ||
− | |7||colspan="2"|'''"relative to"''' variable. 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 8 and 9 give the low and high order byte respectively. | + | |7||colspan="2"|'''"relative to"''' variable. 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 8 and 9 give the [[Byte Order|low and high order byte]] respectively. |
|- | |- | ||
|8 & 9||colspan="2"|qualifiers on the variable from operand 7, eg. Local(0xnnnn) | |8 & 9||colspan="2"|qualifiers on the variable from operand 7, eg. Local(0xnnnn) |
Revision as of 15:41, 24 April 2011
Find Location For | ||
---|---|---|
OpCode: | 0x0010 | |
Game Version: | The Sims 2 |
Contents |
Overview
This primitive provides a way to place an object inside the simulation from SimAntics. For example, if you just want to find an empty floor tile for an object, rather than putting the object on a table where you would likely use the Snap Into primitive.
Use
There is no instruction wizard for this instruction, so the following table details the meaning of each of the operands.
Operand | Description | Operand Values |
---|---|---|
0 | Qualify location | 00:normal 01:out of world 02:normal in same room 03:along object vector 04:lateral to object vector 05:in routing slot in Param 0x00 (see operand 10) 06:in routing slot in Local 0x00 (see operand 10) 07:in literal routing slot 0x00 (see operand 10) 08:in global routing slot 0x00 (see operand 10) |
1 | qualifier on the variable for Start at | |
2 - bit 1 | Controls variable containing object to Find Location For |
on: Stack Object, start at Local variable (see operand 1) off: Variable in operand 4, relative to Variable in operand 7. |
2 - bit 2 | Controls "prefer empty" | off: True on: False (N.B. reversed from usual bit settings) |
2 - bit 3 | Controls "user editable" | off: False on: True |
2 - bit 4 | Controls "facing" | Compass direction set using operand 3 |
2 - bit 5 | Controls "on level ground" | off: False on: True |
2 - bit 6 | Controls "with empty border" | off: False on: True |
2 - bit 7 | Controls "begin in front of refobj" | off: False on: True |
2 - bit 8 | Controls "with line of sight to center" | off: False on: True |
3 - bit 1 | Compass direction for "facing". It appears you can set on multiple bits, but I haven`t tried it out to see what it means if you do |
N |
3 - bit 2 | NE | |
3 - bit 3 | E | |
3 - bit 4 | SE | |
3 - bit 5 | S | |
3 - bit 6 | SW | |
3 - bit 7 | W | |
3 - bit 8 | NW | |
4 | Variable containing object to Find Location For. 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 5 and 6 give the low and high order byte respectively. | |
5 & 6 | qualifiers on the variable from operand 4, eg. Local(0xnnnn) | |
7 | "relative to" variable. 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 8 and 9 give the low and high order byte respectively. | |
8 & 9 | qualifiers on the variable from operand 7, eg. Local(0xnnnn) | |
10 | Variable for routing slot | |
11 thru 15 | Unused? |
Problems?
For the most part, with a generic call to Find Location For, I wouldn't expect it to fail. Clearly, no empty tiles or all tiles meeting specified requirement for placement being full would cause a failure. If you have a generic request though and it appears to be failing, the problem may well be with the object that you are attempting to place. I have had errors because my object's Main failed. I suggest testing your object is placeable generally by buying it from the Buy Mode Catalog (temporarily making it buyable if needed) and placing it where you think this instruction should place it, to check all is well with the object.