Difference between revisions of "RestrictedVehicle"

From cluster wiki
Jump to navigation Jump to search
Tags: Visual edit Manual revert
Line 28: Line 28:
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Syntax:</dt>
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Syntax:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
[obj, varName, text] call '''EMF_fnc_restrictedVehicle'''
[obj, varName, text] call '''emf_gameplay_fnc_restrictedVehicle'''
</div></dd>
</div></dd>


Line 59: Line 59:
<dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;">
<dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;">
myCrewman setVariable ["ms_tankCrew", true, true];<br>
myCrewman setVariable ["ms_tankCrew", true, true];<br>
[myVehicle, "ms_tankCrew", "You require a crewman kit to operate this position"] call '''EMF_fnc_restrictedVehicle''';
[myVehicle, "ms_tankCrew", "You require a crewman kit to operate this position"] call '''emf_gameplay_fnc_restrictedVehicle''';
</code></dd>
</code></dd>



Revision as of 13:17, 26 March 2022

Description
Description:

This function restricts a given vehicles operator roles (Driver, Gunner and Commander) to playerUnits with a given variablename set as true.

Execution:

call

Groups:

Gameplay Utility Functions: Eric's Mission Framework

Syntax
Syntax:

[obj, varName, text] call emf_gameplay_fnc_restrictedVehicle

Parameters:

obj: Object - Vehicle to apply restrictions to.

varName: String - Variablename to check for on unitNamespace of entered unit.

text: String - Text to display upon unit being kicked out of seat.

Return Value:

Boolean - Returns true on success.

Examples
Example 1:
myCrewman setVariable ["ms_tankCrew", true, true];
[myVehicle, "ms_tankCrew", "You require a crewman kit to operate this position"] call emf_gameplay_fnc_restrictedVehicle;
Additional Information
See also:


Notes