Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

2018 Calendar Contest Winners - posted on 10th Jan 2018 at 5:38 PM
This page is located on the SimsWiki. To view it in it's original form, click here.
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 editing
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 Local 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.

You may find that if the Find Location For variable is not set to the Stack Object, the results are unpredictable. In this case the most common error is that the object you are attempting to place does not appear where it should, but instead the reference object is displaced.

See also