BIS fnc setVehicleMass: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Vehicles(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 11: | Line 10: | ||
|eff= global |Effect= | |eff= global |Effect= | ||
| Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function). |Description= | | Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function). |Description= | ||
| [vehicle, animationInformation, massDifference] call [[BIS_fnc_setVehicleMass]] |Syntax= | | [vehicle, animationInformation, massDifference] call [[BIS_fnc_setVehicleMass]] |Syntax= | ||
Line 27: | Line 24: | ||
| [[Boolean]] - success state |Return value= | | [[Boolean]] - success state |Return value= | ||
2) Doesn't care about the current phase of animations, it will change the mass for the given sources | 2) Doesn't care about the current phase of animations, it will change the mass for the given sources | ||
Line 42: | Line 38: | ||
|x3= <code>{{codecomment|// will do the same as the first example, then subtract 150 to the mass}} | |x3= <code>{{codecomment|// will do the same as the first example, then subtract 150 to the mass}} | ||
result = [<nowiki/>[[this]], [], -150] [[call]] [[BIS_fnc_initVehicle]];</code> |Example 3= | result = [<nowiki/>[[this]], [], -150] [[call]] [[BIS_fnc_initVehicle]];</code> |Example 3= | ||
| [[setMass]], [[setCenterOfMass]] |See also= | | [[setMass]], [[setCenterOfMass]] |See also= |
Revision as of 23:47, 16 January 2021
Description
- Description:
- Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function).
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- [vehicle, animationInformation, massDifference] call BIS_fnc_setVehicleMass
- Parameters:
- vehicle: Object
- animationInformation: Boolean or Array - (Optional, default
[]
) - massDifference: Number - (Optional, default 0) value to add to the mass (can be negative)
- Return Value:
- Boolean - success state
Examples
- Example 1:
// default behaviour, change the mass according to the current phase of the animation sources result = [this] call BIS__fnc_setVehicleMass; result = [this, [], 0] call BIS_fnc_setVehicleMass;
- Example 2:
// doesn't care about the current phase of animations, it will change the mass for the given sources result = [this, ["source1", 1, "source2", 0]] call BIS_fnc_initVehicle;
- Example 3:
// will do the same as the first example, then subtract 150 to the mass result = [this, [], -150] call BIS_fnc_initVehicle;
Additional Information
- See also:
- setMasssetCenterOfMass
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note