There are three ways to define the camera positions for different vehicles.
Option 1.
All cars and trucks automatically have mirrors. If you don't define a custom position then a generic position is assigned automatically. Position results will vary between object types.
Option 2.
To set a custom positon. First create an object variable that contains the positions in a vehicles init area.
e.g.
Code:
_this setvariable ["mirrorpos",[1.4,3.0,-0.1],true];
If you want the mirrors to emulate a black nd white camera effect then add an object variable for the camera effect.
e.g.
Code:
_this setvariable ["Camera",true,true];
Other vehicles need to actually call the function to be given the mirrors. See the examples below.
Below great for the LAV25.
Code:
spwnrtn1 = this spawn
{
_this setvariable ["mirrorpos",[0,-3.1,-0.2],true];
_this setvariable ["Camera",true,true];
waituntil{Blakes_Mirrors_Loaded};
sleep 0.01;
[[_this]] CALL Fcn_Blakes_Mirrors;
};
Below great for the striker.
Code:
nul1 = this spawn
{
_this setvariable ["mirrorpos",[1.4,3.0,-0.1],true];
waituntil{Blakes_Mirrors_Loaded};
sleep 0.01;
[[_this]] CALL Fcn_Blakes_Mirrors;
};
Option 3.
Use the global array to store all the information.
The first entry is the class name of the vehicle.
The second entry is the position of the mirrors.
The third entry is true or false to indicate whether it is a camera or not.
Code:
Blakes_Mirror_positions = ["LAV25",[0,-3.1,-0.2],true,"LAV25_HQ",[0,-3.1,-0.2],true];
The other benefit of creating this global array is that non car and truck class vehicles will automatically gain mirrors if they are in the array.
In the above example placing either types of the Lav down will automatically have mirrors when the mission is played.