BIS fnc setVehicleMass: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page filling) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma3 | | |game1= arma3 | ||
|version1= 1.00 | |||
| | |gr1= Object Manipulation | ||
|arg= local | |arg= local | ||
|eff= global | |eff= global | ||
| Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function). | |descr= Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function). | ||
| [vehicle, animationInformation, massDifference] call [[BIS_fnc_setVehicleMass]] | |s1= [vehicle, animationInformation, massDifference] call [[BIS_fnc_setVehicleMass]] | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
|p2= animationInformation: [[Boolean]] or [[Array]] - (Optional, default | |p2= animationInformation: [[Boolean]] or [[Array]] - (Optional, default <sqf inline>[]</sqf>) | ||
* [[Boolean]] - [[true]] to take current animations mass in consideration, [[false]] to set "raw" mass | * [[Boolean]] - [[true]] to take current animations mass in consideration, [[false]] to set "raw" mass | ||
* [[Array]] - animation sources and phases to format ["animationSource1", 1, "animationSource2", 0, ...] | * [[Array]] - animation sources and phases to format ["animationSource1", 1, "animationSource2", 0, ...] | ||
|p3= massDifference: [[Number]] - (Optional, default 0) value to add to the mass (can be negative) | |p3= massDifference: [[Number]] - (Optional, default 0) value to add to the mass (can be negative) | ||
| [[Boolean]] - success state | |r1= [[Boolean]] - success state | ||
|x1= <sqf> | |||
// 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; | |||
</sqf> | |||
|x2= <sqf> | |||
// 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; | |||
</sqf> | |||
| | |x3= <sqf> | ||
result = | // will do the same as the first example, then subtract 150 to the mass | ||
result = [this, [], -150] call BIS_fnc_initVehicle; | |||
</sqf> | |||
| | |seealso= [[setMass]] [[setCenterOfMass]] | ||
}} | }} | ||
Latest revision as of 14:59, 13 July 2022
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:
- 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:
- setMass setCenterOfMass
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