Difference between revisions of "0x0014"
MogHughson (Talk | contribs) (→Use) |
Sophie-David (Talk | contribs) (→Overview: Corrected link for Find Best Object for Function) |
||
(4 intermediate revisions by one user not shown) | |||
Line 6: | Line 6: | ||
==Overview== | ==Overview== | ||
− | This [[Primitives|primitive]] provides a way to run one of the main functions within the game that an object provides. It is often used after running [[ | + | This [[Primitives|primitive]] provides a way to run one of the main functions within the game that an object provides. It is often used after running [[0x000E|Find Best Object for Function [0x000E]]] which has the effect of setting the object that it found in the [[Sims 2 Variables#Stack Object|Stack Object]] variable. You can set an object you know has such a function into the [[Sims 2 Variables#Stack Object|Stack Object]] variable yourself prior to running this [[Primitives|primitive]] instead if you wish. |
===Functions=== | ===Functions=== | ||
Line 23: | Line 23: | ||
!Operand!!Description!!Operand Values | !Operand!!Description!!Operand Values | ||
|- | |- | ||
− | |0||Function||00: prepare food<br>01: cook food<br>02: flat surface<br>03: dispose<br>04: eat<br>05: pick up from slot<br>06: wash dish<br>07: eating surface<br>08: sit<br>09: | + | |0||Function||00: prepare food<br>01: cook food<br>02: flat surface<br>03: dispose<br>04: eat<br>05: pick up from slot<br>06: wash dish<br>07: eating surface<br>08: sit<br>09: stand<br>0A: serving surface<br>0B: clean<br>0C: garden<br>0D: wash hands<br>0E: repair<br>0F: restock<br>10: wash clothes (unused)<br>11: message handler<br>12: pre route<br>13: post route<br>14: goal check<br>15: reaction handler<br>16: along route callback<br>17: awareness<br>18: reset<br>19: look at target<br>1A: utility state change<br>1B: global awareness<br> |
|- | |- | ||
|1||colspan="2"|Unused | |1||colspan="2"|Unused |
Latest revision as of 17:49, 1 December 2011
Run Functional Tree | ||
---|---|---|
OpCode: | 0x0014 | |
Game Version: | The Sims 2 |
Contents |
[edit] Overview
This primitive provides a way to run one of the main functions within the game that an object provides. It is often used after running Find Best Object for Function [0x000E] which has the effect of setting the object that it found in the Stack Object variable. You can set an object you know has such a function into the Stack Object variable yourself prior to running this primitive instead if you wish.
[edit] Functions
The functions in question are all shown in the Object Functions(OBJf) of the object you want to run them against (the OBJf has a number of other functions as well as the ones you can run in this way). In general (as in the example) these functions are provided with an Action BHAV and a Guardian BHAV. You can choose to run the Guardian BHAV only by selecting the bit that controls "running check tree only".
[edit] 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 | Function | 00: prepare food 01: cook food 02: flat surface 03: dispose 04: eat 05: pick up from slot 06: wash dish 07: eating surface 08: sit 09: stand 0A: serving surface 0B: clean 0C: garden 0D: wash hands 0E: repair 0F: restock 10: wash clothes (unused) 11: message handler 12: pre route 13: post route 14: goal check 15: reaction handler 16: along route callback 17: awareness 18: reset 19: look at target 1A: utility state change 1B: global awareness |
1 | Unused | |
2 - bit 1 | Controls change icon | off: False on: True |
2 - bit 2 | Controls passing parameters from calling tree | off: False on: True |
2 - bit 3 | Controls running check tree only | off: False on: True |
3 thru 15 | unused |