BIS fnc aircraftFoldingWings: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (rollback)
m (Text replacement - " ( *class [a-zA-Z0-9_]+): *([a-zA-Z0-9_]+ *) " to " $1 : $2 ")
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.70


|1.70|Game version=
|arg= local
|eff= global


<!---|arg= local |Multiplayer Arguments=--->
|gr1= Aircraft Functionality


<!---|eff= local |Multiplayer Effects=--->
|descr= Handles foldable wings of aircrafts. Is supposed to be used from within class Eventhandlers of the vehicle. See [[Arma 3: Aircraft Systems]] for information about needed config changes.
<syntaxhighlight lang="cpp">
class Eventhandlers : Eventhandlers
{
engine = "_this call BIS_fnc_aircraftFoldingWings";
gear = "_this call BIS_fnc_aircraftFoldingWings";
};
</syntaxhighlight>


| <pre>/*
|s1= [aircraft, animationState] call [[BIS_fnc_aircraftFoldingWings]]
Author: Bravo Zero One development
- John_Spartan


Description:
|p1= aircraft: [[Object]]
- This function is designed to prevent take off with folded wings on the Jets DLC aircraft that have such useraction/function enabled.


Exucution:
|p2= animationState: [[Boolean]] - (optional, default [[false]]) if [[false]], the function will just terminate
- Call the function via int EH on each aircrfat config
class Eventhandlers: Eventhandlers
{
engine = "_this call bis_fnc_aircraftFoldingWings";
gear = "_this call bis_fnc_aircraftFoldingWings";
};


Requirments:
|r1= [[Nothing]]
- Compatible aircrfat must have a config definition for all subsytems that will be invoked by this function


example of cfgVehicles subclass definitions;
|x1= <sqf>[_aircraft, 1] call BIS_fnc_aircraftFoldingWings;</sqf>
class AircraftAutomatedSystems
{
wingStateControl = 1; //enable automated wing state control to prevent player to take off with folded wings
wingFoldAnimations[] = {"wing_fold_l","wing_fold_r","wing_fold_cover_l", "wing_fold_cover_r"}; //foldable wing animation list
wingStateFolded = 1; //animation state when folded
wingStateUnFolded = 0; //animation state when un-folded
wingAutoUnFoldSpeed = 40; //speed treshold when triger this feature, and unfold wings for player


};
|seealso= -
 
Parameter(s):
_this select 0: mode (Scalar)
0: plane/object
 
 
Returns: nothing
Result: Aircrfat should not be able to take off/ fly with wings folded
 
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=
 
|[] call [[BIS_fnc_AircraftFoldingWings]]|Syntax=
 
|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
 
|Datatype - description|Return value=
 
|x1= <code></code>|Example 1=
 
|exec= call |Execution=
 
| |See also=
}}
}}
[[Category:Function Group: AircraftFunctionality|{{uc:AircraftFoldingWings}}]]
[[Category:Functions|{{uc:AircraftFoldingWings}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:AircraftFoldingWings}}]]

Latest revision as of 10:58, 6 December 2023

Hover & click on the images for description

Description

Description:
Handles foldable wings of aircrafts. Is supposed to be used from within class Eventhandlers of the vehicle. See Arma 3: Aircraft Systems for information about needed config changes.
class Eventhandlers : Eventhandlers
{
	engine = "_this call BIS_fnc_aircraftFoldingWings";
	gear = "_this call BIS_fnc_aircraftFoldingWings";
};
Execution:
call
Groups:
Aircraft Functionality

Syntax

Syntax:
[aircraft, animationState] call BIS_fnc_aircraftFoldingWings
Parameters:
aircraft: Object
animationState: Boolean - (optional, default false) if false, the function will just terminate
Return Value:
Nothing

Examples

Example 1:
[_aircraft, 1] call BIS_fnc_aircraftFoldingWings;

Additional Information

See also:
-

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