-
Notifications
You must be signed in to change notification settings - Fork 5
Authorized Crew Check
| File location | f\authorisedCrew\fn_authorisedCrewCheck.sqf |
| Enabled by default? | no |
| Enable/Disable in | init.sqf |
| Runs on | client |
One way of encouraging players to stick to their designated roles is to prevent certain units from acting as pilots / drivers / gunners or commanders of specialist vehicles such as tanks and aircraft. The Authorised Crew Check component is a quick and easy way of ensuring that only players in selected slots are able to act as crew-members on particular vehicles. If a player that is not authorised to act as crew attempts to get in as anything except cargo (passenger), they will be automatically ejected with a warning message. The Authorised Crew Check component can also restrict crews of particular vehicles to unit types (such as pilots).
In the ArmA 3 editor, select the vehicle and ensure it has a name in the Name field (such as MyTank).
Still in the editor, make sure the playable slots that you want to have as the authorised crew-members also have unique entries in their Name field (such as MyDriver, MyCommander and MyGunner).
Note that all units in the F3 Folk ARPS Platoons have values in their Name fields already, which you can use.
Open the file init.sqf and look for the code segment entitled:
// F3 - Authorised Crew CheckEdit the following line, removing the // at the start, replacing VehicleName with the name of the vehicle, and the array [UnitName1,UnitName2] with an array containing the names of the authorised crew members.
// VehicleName addEventhandler ["GetIn", {[_this,[UnitName1,UnitName2],false] call f_fnc_authorisedCrewCheck}];For example, to ensure that only MyDriver, MyCommander and MyGunner can act as the crew of MyTank, change the line to:
MyTank addEventhandler ["GetIn", {[_this,[MyDriver,MyCommander,MyGunner],false] call f_fnc_authorisedCrewCheck}];For example, to ensure that only units of the class "B_Soldier_F" can act as the crew of MyTank, change the line to:
MyTank addEventhandler ["GetIn", {[_this,["B_Soldier_F"],false] call f_fnc_authorisedCrewCheck}];This script also checks for all sub-classes of the parsed class. For example, to allow only any type of NATO soldier to MyTank, change the line to:
MyTank addEventhandler ["GetIn", {[_this,["B_Soldier_base_F"],false] call f_fnc_authorisedCrewCheck}];Common unit types that you may want to use are:
| Faction | Type | Classname |
|---|---|---|
| NATO | General class | B_Soldier_base_F |
| Pilot | B_Helipilot_F | |
| Armoured Crew | B_crew_F | |
| CSAT | General class | O_Soldier_base_F |
| Pilot | O_helipilot_F | |
| Armoured Crew | O_crew_F | |
| AAF | General class | I_Soldier_base_F |
| Pilot | I_helipilot_F | |
| Armoured Crew | I_crew_F | |
| FIA | General class | I_G_Soldier_base_F |
If the last parameter is changed from false to true, the crew restrictions will apply to the vehicle's cargo slots as well.
For example, in the following line only the unit named UnitNATO_CO would be allowed to either crew the vehicle named MyTruck or take any of its cargo seats.
MyTruck addEventhandler ["GetIn", {[_this,[UnitNATO_CO],true] call f_fnc_authorisedCrewCheck}];- There is a known limitation with this feature: if a unit enters a vehicle as a passenger, s/he can sometimes use the action menu to move to a pilot / driver / commander / gunner position.
- Assign Gear
- Assign Gear AI
- Authorized Crew Check
- Briefing
- Casualties Cap
- Disable Thermals
- Dynamic View Distance
- E & E Check
- FCS
- Fire Team Member Markers
- Group Markers
- Group Join
- Map Click Teleport
- Medical System
- Mission Conditions
- Multiplayer Ending Controller
- Nametags
- Premount
- Radio
- Remove Body
- Safe Start
- Group ID
- Color Teams
- AI Skill
- Spectator
- Zeus Support