mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add documentation for Medical Vehicles & Facilities (#9724)
* add doc on medical facilities and vehicles * fix typo Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update docs/wiki/framework/medical-treatment-framework.md Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
a5da6cc83d
commit
676a4b97a6
@ -57,9 +57,60 @@ class ACE_Medical_Treatment_Actions {
|
||||
};
|
||||
```
|
||||
|
||||
## 2. Mission Variables
|
||||
## 2. Medical Vehicles and Facilities
|
||||
|
||||
### 2.1 Grave Digging Object Configuration
|
||||
### 2.1 Medical Vehicles
|
||||
|
||||
To configure a vehicle as a Medical Vehicle by default, set the `attendant` property in the vehicle's config to `1`.
|
||||
```cpp
|
||||
class CfgVehicles {
|
||||
class MyAmbulance {
|
||||
attendant = 1;
|
||||
};
|
||||
};
|
||||
```
|
||||
To set a vehicle as a Medical Vehicle mid-mission, set the `ace_medical_isMedicalVehicle` variable globally.
|
||||
```sqf
|
||||
// Sets the object behind your cursor to be a medical vehicle
|
||||
cursorObject setVariable ["ace_medical_isMedicalVehicle", true, true];
|
||||
|
||||
// Create an interaction to turn a vehicle into a medical vehicle
|
||||
private _statement = {_target setVariable ["ace_medical_isMedicalVehicle", true, true]};
|
||||
private _action = ["TAG_makeMedicalVehicle", "Set as Medical Vehicle", _statement, {!([_target] call ace_medical_treatment_fnc_isMedicalVehicle)}] call ace_interact_menu_fnc_createAction;
|
||||
[cursorObject, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
// Set all vehicles of type "B_Truck_01_transport_F" as medical vehicles
|
||||
private _classname = "B_Truck_01_transport_F";
|
||||
private _affectChildClasses = false; // Affect variants of this vehicle
|
||||
["B_Truck_01_transport_F", "InitPost", {
|
||||
params ["_vehicle"];
|
||||
if (!local _vehicle) exitWith {};
|
||||
_vehicle setVariable ["ace_medical_isMedicalVehicle", true, true];
|
||||
}, _affectChildClasses, [], true] call CBA_fnc_addClassEventHandler;
|
||||
```
|
||||
|
||||
### 2.2 Medical Facilities
|
||||
|
||||
To configure an object as a Medical Facility by default, add a new array containing its classname to the `ace_medical_facilities` class in config root.
|
||||
```cpp
|
||||
class CfgVehicles {
|
||||
class ThingX;
|
||||
class MyMedicalFacility: ThingX {};
|
||||
class MyMedicalFacility2_ElectricBoogaloo: MyMedicalFacility {};
|
||||
};
|
||||
|
||||
class ace_medical_facilities {
|
||||
TAG_allOfMyFacilities[] = {"MyMedicalFacility", "MyMedicalFacility2_ElectricBoogaloo"};
|
||||
};
|
||||
```
|
||||
To set an object as a Medical Facility mid-mission, set the `ace_medical_isMedicalFacility` variable globally. See above.
|
||||
|
||||
|
||||
Both Medical Facilities and Medical Vehicles can also be created via the Eden Editor's attributes menu.
|
||||
|
||||
## 3. Mission Variables
|
||||
|
||||
### 3.1 Grave Digging Object Configuration
|
||||
|
||||
The object created when digging a grave can be modified by setting the `ace_medical_treatment_graveClassname` variable.
|
||||
```sqf
|
||||
@ -71,7 +122,7 @@ The object's rotation can also be modified, if necessary.
|
||||
ace_medical_treatment_graveRotation = 0; // rotation angle (will depend on model classname)
|
||||
```
|
||||
|
||||
### 2.2 Zeus Medical Menu Module
|
||||
### 3.2 Zeus Medical Menu Module
|
||||
|
||||
If a mission maker wishes to disable Zeus access to the medical menu, they can set the variable below:
|
||||
ace_medical_gui_enableZeusModule = false; // default is true
|
||||
|
Loading…
Reference in New Issue
Block a user