forked from acemod/ACE3
-
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.
fixed set mulit Gvar & added more maps
- Loading branch information
1 parent
40e1b1b
commit 147d140
Showing
14 changed files
with
106 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Salbei | ||
* Add or remove a unit to the GVAR | ||
* | ||
* Arguments: | ||
* 0: Trench <OBJECT> | ||
* 1: Unit <OBJECT> | ||
* 2: State <BOOLEAN> | ||
* 3: RemoveAll <BOOLEAN> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [TrenchObj, ACE_player, true, false] call ace_trenches_fnc_handleDiggerToGVAR | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_trench", "_unit", "_state", ["_removeAll", false]]; | ||
|
||
if (_removeAll) exitWith { | ||
_trench setVariable [QGVAR(diggingPlayers), [], true]; | ||
}; | ||
|
||
if (_state) then { | ||
private _diggingPlayers = _trench getVariable [QGVAR(diggingPlayers), []]; | ||
private _return = _diggingPlayers pushBackUnique _unit; | ||
if (_return > -1) then { | ||
_trench setVariable [QGVAR(diggingPlayers), _diggingPlayers, true]; | ||
}; | ||
} else { | ||
private _diggingPlayers = _trench getVariable [QGVAR(diggingPlayers), []]; | ||
_diggingPlayers - [_unit]; | ||
_trench setVariable [QGVAR(diggingPlayers), _diggingPlayers, true]; | ||
}; |
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
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