mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Updated function documentation of Weaponselect
This commit is contained in:
parent
94be0d9fbd
commit
e4a4a942d0
@ -1,14 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
|
||||||
* Count how many grenade magazines the unit has on the uniform and vest.
|
* Count how many grenade magazines the unit has on the uniform and vest.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Muzzle name
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: Muzzle Class <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* 0: Number of magazines
|
* 0: Number of magazines <NUMBER>
|
||||||
* 1: First magazine name
|
* 1: First magazine name <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, currentMuzzle player] call ace_weaponselect_fnc_countMagazinesForGrenadeMuzzle
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
|
||||||
* Display a grenade type and quantity.
|
* Display a grenade type and quantity.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: magazine class
|
* 0: magazine class <STRING>
|
||||||
* 1: number of magazines
|
* 1: number of magazines <NUMBER>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [currentMagazine player, 3] call ace_weaponselect_fnc_displayGrenadeTypeAndNumber
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
@ -18,7 +22,7 @@ private ["_color", "_name", "_text", "_picture"];
|
|||||||
|
|
||||||
params ["_magazine", "_numberofMagazines"];
|
params ["_magazine", "_numberofMagazines"];
|
||||||
|
|
||||||
_color = [[1,0,0], [1,1,1]] select (_numberofMagazines > 0);
|
_color = [[1, 0, 0], [1, 1, 1]] select (_numberofMagazines > 0);
|
||||||
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
||||||
|
|
||||||
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);
|
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Find the next Grenade Magazine.
|
* Find the next Grenade Magazine.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
|
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Magazine classname <STRING>
|
* Magazine classname <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* ["All"] call ace_weaponselect_fnc_findNextGrenadeMagazine
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Find the next Grenade Muzzle.
|
* Find the next Grenade Muzzle.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
|
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Class name of next throw muzzle <STRING>
|
* Class name of next throw muzzle <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* ["All"] call ace_weaponselect_fnc_findNextGrenadeMuzzle
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Fire Vehicle Smoke Launcher.
|
* Fire Vehicle Smoke Launcher.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [vehicle player] call ace_weaponselect_fnc_fireSmokeLauncher
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Returns the selected Grenade Muzzle.
|
* Returns the selected Grenade Muzzle.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Class name of selected throw muzzle. <STRING>
|
* Class name of selected throw muzzle <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [] call ace_weaponselect_fnc_getSelectedGrenade
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Play the change firemode sound for specified weapon at units position.
|
* Play the change firemode sound for specified weapon at units position.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Weapon <STRING>
|
* 1: Weapon <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, currentWeapon player] call ace_weaponselect_fnc_playChangeFiremodeSound
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* The unit will put its current weapon away.
|
* The unit will put its current weapon away.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_weaponselect_fnc_putWeaponAway
|
||||||
|
*
|
||||||
|
* Public: NO
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain, commy2
|
* Author: esteldunedain, commy2
|
||||||
*
|
|
||||||
* Cycle through all grenades.
|
* Cycle through all grenades.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_weaponselect_fnc_selectGrenadeAll
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain, commy2
|
* Author: esteldunedain, commy2
|
||||||
*
|
|
||||||
* Cycle through frags.
|
* Cycle through frags.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_weaponselect_fnc_selectGrenadeFrag
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain, commy2
|
* Author: esteldunedain, commy2
|
||||||
*
|
|
||||||
* Cycle through non explosive grenades.
|
* Cycle through non explosive grenades.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_weaponselect_fnc_selectGrenadeOther
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* The player will select the specified weapon or will change to the next firing mode if the weapon was already selected.
|
* The player will select the specified weapon or will change to the next firing mode if the weapon was already selected.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Weapon <STRING>
|
* 1: Weapon <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMode
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* The player will select the specified weapon and change to the first additional muzzle. E.g. the grenade launcher of a assault rifle.
|
* The player will select the specified weapon and change to the first additional muzzle. E.g. the grenade launcher of a assault rifle.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Weapon <STRING>
|
* 1: Weapon <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMuzzle
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Select weapon for unit in vehicle.
|
* Select weapon for unit in vehicle.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Vehicle <OBJECT>
|
* 1: Vehicle <OBJECT>
|
||||||
* 2: Weapon index <NUMBER>
|
* 2: Weapon index <NUMBER>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, vehicle player, 1] call ace_weaponselect_fnc_selectWeaponVehicle
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
|
||||||
* Select the next grenade muzzle to throw.
|
* Select the next grenade muzzle to throw.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Muzzlename <STRING>
|
* 1: Muzzlename <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, currentMuzzle player] call ace_weaponselect_fnc_setNextGrenadeMuzzle
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Display Grenade information on grenade throw.
|
* Display Grenade information on grenade throw.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: unit - Object the event handler is assigned to <OBJECT>
|
* 0: unit - Object the event handler is assigned to <OBJECT>
|
||||||
* 1: weapon - Fired weapon <STRING>
|
* 1: weapon - Fired weapon <STRING>
|
||||||
* 2: muzzle - Muzzle that was used <STRING>
|
* 2: muzzle - Muzzle that was used <STRING>
|
||||||
@ -12,8 +11,13 @@
|
|||||||
* 5: magazine - magazine name which was used <STRING>
|
* 5: magazine - magazine name which was used <STRING>
|
||||||
* 6: projectile - Object of the projectile that was shot <OBJECT>
|
* 6: projectile - Object of the projectile that was shot <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user