buildingPos: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Scripting Commands]] | |||
[[Category:Scripting Commands OFP 1.97]] | |||
[[Category:Scripting Commands OFP 1.46]] | |||
[[Category:Scripting Commands ArmA]] | |||
back to [[Scripting_Reference#B|COMREF]] | back to [[Scripting_Reference#B|COMREF]] | ||
Revision as of 15:59, 19 April 2006
back to COMREF
building buildingPos index
Operand types:
building: Object
index: Number
Type of returned value:
Description:
Returns given indexed position in building, returned value is in format Position.
Examples:
buildingPos [building2, 1] unit setPos ((object 21222) buildingPos 1)
Comments:
These examples will move a unit to the 1st position specified in a buildings model, in the second example - bunker1.
this move (building buildingPos 1)
this move (bunker1 buildingPos 1)
In the default game buildings, the buildingPos is usually right behind a window.
This can make it easy to place units in the windows of buildings, by putting the unit near a building and putting this in its init field:
this setpos getpos (buildingPos [ nearestbuilding this, 1])