Every Object which is located on the map, owns an own ID which is individual to each single Object, indifferently whether it’s a tree, bridge, house or a part of a street. One can get the ID´s displayed by clicking the respective button in the Editor which is called Show ID´s. Now its possible to check the status of each Object, may be to use it for a condition or lots of further reasons which are dedicated to the mission targets.
In Operation Flashpoint® the following command was used:
(Object 12345) setDamage 1
But this command is unfortunately no more running in ArmA©. Now the both commands NearestObject and NearestBuilding are to be used.
To call the respective object one need to place a game logic or a trigger right onto the object and notes its ID. The following Syntax is calling the respective object. It´ll defined into the initline of the logic:
House=position this nearestObject 441616
or House=nearestObject this resp. House=nearestBuilding this
The word House is just a variable and can be free defined. Object1 would also a possible way to name the object. The rest of the Syntax is the actual important one, because the ID at the end of the line, will call the object. The logic needs to be placed directly onto the object, its also possible to use some an object then a game logic. One should take care that the logic or object will be placed right onto the ID or close to it and that the Syntax will defined accurate. If one is using this command with a direct ID call, so the logic can be set free on the map.
A example how it would look like in the Editor:
Once the Object or ID got a name allocated (as shown above: House) so it can be used in different ways. There’re some examples shown on the next page about how to use this possibility now.
Allocate a dammage to an Object:
Once a object received a name so one can either dammage or heal it again. To do this the already known SetDamage Syntax is needed:
HousesetDamage 1
Chapter 5
5.61 – Using ID´s
Getting dammage status of an object:
By using the following Syntax, one has the possibility to receive the dammage status of an object.
getDammage House
This information can be used again for further things like conditions or any other things, to check whether the building or the respective object received a dammage value which is even higher or less then a predefined one. used in a checking trigger would look like this:
Checking trigger:
Axis a/b: 0
Condition: getdammage House> 0.7
on Activation: hint “The building is heavy damaged!”
Destruction as condition or Mission target:
As explained on the prior side, the user has now the possibility to use the destruction of an object as condition or a mission target. If a condition has to be defined, so it needs to be written in the onActivation line of a trigger or waypoint.
Condition : ! (alive House) or not alive House
If the destroyed building has to be defined as mission target so a checking trigger is needed which only needs to be placed on the map defined as End 1.
Checking trigger:
Type: End 1
Once
Axis a/b: 0
Text: Mission Target
Condition : ! (alive House)
Its recommended to use the countdown again, to make sure, that End 1 will not get caused right when the building has been destroyed but a little later. Chapter 4.6 will explain the way how to end a mission, much more better.
Indestructible Object:
If one wants that some objects are not to be destructible so one can use the following possibility. At first the object needs to be named as explained in Chapter 5.61 and furthermore a checking trigger has to be placed on the map which has following settings:
Checking trigger:
Type: Repeatedly
Axis a/b: 0
Condition: getDammage House > 0.1 on Activation: House setdamage 0
If the object is receiving a damage which is higher then the value 0.1, so the damage will reset back to 0. Because the trigger was set to repeatedly so the building will never be destroyed.
Opening/closing doors of an object:
Some objects have animated doors which can either be opened or even closed by using the action menu. Now its possible to control these doors, if the respective object has been named before as explained in Chapter 5.61. The needed Syntax sounds:
Houseanimate ["dvere1",1]
Dvere1 stands for door 1. Each further door does have to be named Dvere2, Dvere3 aso.
They will be closed with 0 and get opened again with 1. Further possibilities are:
Bareanimate ["Bargate",1] - To control the barrier Target animate ["Terc",1] - To control the target Deactivate lanterns resp. lights:
One can deactivate lanterns or even lights by using the ID´s. But before the object needs to get named at first by using the following Syntax:
Light1=nearestObject this
One only needs to place a game logic next to the lantern and enter the Syntax into the initline. Then it can be called from any place on the map (waypoint, trigger etc.). To do this use following command:
Light1switchLight "Off"
If both command lines are entered into the initline of the logic so the lights will be deactivated so far the mission begins.
Light1=nearestObject this; Light1 switchLight "Off"
Chapter 5
Many buildings in Armed Assault® are passable as they was in Operation Flashpoint®. But one of the new ArmA® features is that the leader of a group can allocate his Soldiers special positions in a building. To do this only a single mouse click is needed, that will take the effect that the resp. soldiers will move to their desired postions.
These positions are fixed defined positions inside a building modell. Each positions owns an own number. The user can now place the units directly on the desired positions inside or even on the top of the building. A perfect example is the Hotel which has around 265 fixed positions, so the Hotel own nearly the most positions of all used buildings in the game. Because of the fact that its quite unclear where all these positions are located so all five levels with their positions in the Hotel, are shown on the next pages. A special feature can be found in Chapter 6.16. This script will become units patrolling through the building.
To place units inside a building so one only needs to place a unit directly onto the building and defines the following Syntax into the initline of the unit
this setPos (nearestBuilding this buildingPos PositionNumber)
This command is much less complicate then name setPos [X,Y,Z], because all the needed coordinates doesn’t have to get determined before. If the building has been named as explained in Chapter 5.61, so following Syntax can be used as well:
this setPos (HouseNamebuildingPos PositionNumber)
If one wants to place units randomly inside a building so the random command has to be used.
this setPos (nearestBuilding this buildingPos Random 265)
By using this command a random position will be defined now which is located somewhere between 0 and 265.
Ground Floor (Positios 0 till 42)