buildingPos: Difference between revisions
Jump to navigation
Jump to search
m (VBS2 scripting category removal) |
(mass edit: removing obsolete </dt> and </dd> tags) |
||
Line 35: | Line 35: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on August 2, 2006 - 10:45 | <dd class="notedate">Posted on August 2, 2006 - 10:45 | ||
<dt class="note">'''[[User:Hardrock|hardrock]]''' | <dt class="note">'''[[User:Hardrock|hardrock]]''' | ||
<dd class="note"> | <dd class="note"> | ||
''Notes from before the conversion:'' | ''Notes from before the conversion:'' | ||
Line 53: | Line 53: | ||
If buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts. | If buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts. | ||
<dd class="notedate">Posted on January 26, 2007 - 01:02 | |||
<dt class="note">'''[[User:Kronzky|Kronzky]]''' | <dd class="notedate">Posted on January 26, 2007 - 01:02 | ||
<dt class="note">'''[[User:Kronzky|Kronzky]]''' | |||
<dd class="note"> | <dd class="note"> | ||
The highest index is ''not'' necessarily the highest position in a building! Check the z-value to find out the absolute height of a position. | The highest index is ''not'' necessarily the highest position in a building! Check the z-value to find out the absolute height of a position. | ||
<dd class="notedate">Posted on February 16, 2007 | |||
<dt class="note">'''[[User:Bdfy|Bdfy]]''' | <dd class="notedate">Posted on February 16, 2007 | ||
<dt class="note">'''[[User:Bdfy|Bdfy]]''' | |||
<dd class="note"> | <dd class="note"> | ||
'(building buildingPos 1)' will return [0,0,0] if buildingPos with this index does not exist. | '(building buildingPos 1)' will return [0,0,0] if buildingPos with this index does not exist. | ||
<dd class="notedate">Posted on January 08, 2011 | |||
<dt class="note">'''[[User:kju|kju]]''' | <dd class="notedate">Posted on January 08, 2011 | ||
<dt class="note">'''[[User:kju|kju]]''' | |||
<dd class="note"> | <dd class="note"> | ||
Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model). | Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model). | ||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 16:49, 17 October 2011
Description
- Description:
- Returns the given indexed position in a building The index is 0-based (i.e. the first possible position would be 0. So if a building has 5 positions listed in the editor, 4 would be the highest position index usable with this command).
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
_soldier setPos (_house1 buildingPos 2)
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on August 2, 2006 - 10:45
- hardrock
-
Notes from before the conversion:
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 ((nearestBuilding this) buildingPos 1)
The location returned by buildingPos is not reliable after the player has exited and then resumed the mission. For code that is executed immediately after the mission starts there is no problem.
If buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts.
- Posted on January 26, 2007 - 01:02
- Kronzky
- The highest index is not necessarily the highest position in a building! Check the z-value to find out the absolute height of a position.
- Posted on February 16, 2007
- Bdfy
- '(building buildingPos 1)' will return [0,0,0] if buildingPos with this index does not exist.
- Posted on January 08, 2011
- kju
- Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model).
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Command Group: Object Information