-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
133 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: <author> | ||
* Function description | ||
* | ||
* Arguments: | ||
* 0: Objects <ARRAY> | ||
* 1: All <BOOL> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [[bob, ted], false] call afmf_main_fnc_example | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_unit", objNull]]; | ||
if !(alive _unit) exitWith {}; | ||
|
||
_unit addEventHandler ["Killed", { | ||
params ["_unit", "_killer", "_instigator", "_useEffects"]; | ||
|
||
private _logic = _unit getVariable [QGVAR(logic), objNull]; | ||
private _delaySpawnNearbyUnits = _logic getVariable [QGVAR(delaySpawnNearbyUnits), 5]; | ||
_unit setVariable [QGVAR(delaySpawnNearbyUnits), time + random _delaySpawnNearbyUnits]; | ||
|
||
private _tickets = _unit getVariable [QGVAR(tickets), 1]; | ||
_tickets = _tickets - 1; | ||
if (_tickets <= 0) exitWith {}; | ||
|
||
_unit setVariable [QGVAR(tickets), _tickets]; | ||
|
||
private _respawnDelay = _logic getVariable [QGVAR(respawnDelay), [10, 20, 30]]; | ||
[_unit, _logic, false, random _respawnDelay max 1] call FUNC(despawn); | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: <author> | ||
* Function description | ||
* | ||
* Arguments: | ||
* 0: Objects <ARRAY> | ||
* 1: All <BOOL> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [[bob, ted], false] call afmf_main_fnc_example | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_logic", objNull], ["_unitArray", []], ["_groupID", objNull], ["_group", grpNull], ["_groups", []], ["_side", []]]; | ||
|
||
private _active = _logic getVariable [QGVAR(active), true]; | ||
if (_groups isEqualTo []) exitWith { | ||
_groups pushBack [_groupID, _side, [_unitArray], _group]; | ||
if !(_active) then { | ||
_logic setVariable [QGVAR(active), true]; | ||
_logic call FUNC(loop); | ||
}; | ||
}; | ||
private _groupIndex = _groups findIf {_x select 0 isEqualTo _groupID}; | ||
if (_groupIndex isEqualTo -1) exitWith { | ||
_groups pushBack [_groupID, _side, [_unitArray], _group]; | ||
if !(_active) then { | ||
_logic setVariable [QGVAR(active), true]; | ||
_logic call FUNC(loop); | ||
}; | ||
}; | ||
private _groupArray = _groups select _groupIndex; | ||
_groupArray params ["_groupID", "_side", "_units", ["_group", grpNull]]; | ||
_units pushBack _unitArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters