BIS fnc setVehicleMass: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|seealso= ([^ ]+)(\]\]|\}\}), *(\[\[|\{\{)" to "|seealso= $1$2 $3") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *cc*\| *([^}]+) *\}\}" to "// $1") |
||
Line 24: | Line 24: | ||
|r1= [[Boolean]] - success state | |r1= [[Boolean]] - success state | ||
|x1= <code> | |x1= <code>// default behaviour, change the mass according to the current phase of the animation sources | ||
result = [<nowiki/>[[Magic Variables#this_2|this]]] [[call]] [[BIS_fnc_setVehicleMass]]; | result = [<nowiki/>[[Magic Variables#this_2|this]]] [[call]] [[BIS_fnc_setVehicleMass]]; | ||
result = [<nowiki/>[[Magic Variables#this_2|this]], [], 0] [[call]] [[BIS_fnc_setVehicleMass]];</code> | result = [<nowiki/>[[Magic Variables#this_2|this]], [], 0] [[call]] [[BIS_fnc_setVehicleMass]];</code> | ||
|x2= <code> | |x2= <code>// doesn't care about the current phase of animations, it will change the mass for the given sources | ||
result = [<nowiki/>[[Magic Variables#this_2|this]], ["source1", 1, "source2", 0]] [[call]] [[BIS_fnc_initVehicle]];</code> | result = [<nowiki/>[[Magic Variables#this_2|this]], ["source1", 1, "source2", 0]] [[call]] [[BIS_fnc_initVehicle]];</code> | ||
|x3= <code> | |x3= <code>// will do the same as the first example, then subtract 150 to the mass | ||
result = [<nowiki/>[[Magic Variables#this_2|this]], [], -150] [[call]] [[BIS_fnc_initVehicle]];</code> | result = [<nowiki/>[[Magic Variables#this_2|this]], [], -150] [[call]] [[BIS_fnc_initVehicle]];</code> | ||
|seealso= [[setMass]] [[setCenterOfMass]] | |seealso= [[setMass]] [[setCenterOfMass]] | ||
}} | }} |
Revision as of 11:02, 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:
// 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:
- 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