R3vo
The higher the value for the loadCoef the less stamina a unit has. Negative values will dramatically increase the stamina actually to a point where it extends the stamina bar.
Results appear below as you type; use the arrow keys to move through them.
Enables or disables a trait or alters a trait of the given unit. Unit traits consist of unit abilities, which are Booleans and modifiers, which are Numbers. Custom trait can only be a bool.
Note
The command can also be used on vehicles (and drones), and it will get applied to the effectiveCommander of the vehicle. In addition, if the effectiveCommander has a trait, it will get applied to the entire vehicle (for example, the vehicle can become harder to spot due to low camouflageCoef)
Abilities:
unit setUnitTrait [skillName, value, isCustom]
Parameters:
unit: Object - the unit whose trait should be setskillName: String - name of the skillvalue: Boolean or Number - value (see above)isCustom: Boolean - (Optional) Must be set to true in case of customReturns: Nothing
player setUnitTrait ["Medic", true];
getUnitTrait · getAllUnitTraits
The higher the value for the loadCoef the less stamina a unit has. Negative values will dramatically increase the stamina actually to a point where it extends the stamina bar.
The explosiveSpecialist trait can defuse mines (i.e. satchel charges), whilst the engineer trait alone cannot.
Setting staminaDrainCoef to a negative value will gradually replenish stamina/reduce fatigue when running/sprinting. Walking or standing will not be affected.