-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add function to check if AI and condition from fatal
- Loading branch information
1 parent
d055845
commit 31e1e29
Showing
3 changed files
with
52 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
addons/medical/functions/fnc_conditionFromFatalToCardiac.sqf
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,17 @@ | ||
/* | ||
* Author: Arcanum | ||
* Condition for trasfer from FatalInjury to Second chance. | ||
* | ||
* Arguments: | ||
* 0: The Unit <OBJECT> | ||
* 1: 1 for AI 0 for player <BOOL> | ||
* | ||
* Return Value: | ||
* Condition fo state machine <BOOL> | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
params ["_unit","_wantAI"]; | ||
|
||
(GVAR(fatalInjuryConditionAI) > 0) && (QUOTE(_this call FUNC(isAi)) == _wantAI) |
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,27 @@ | ||
/* | ||
* Author: Arcanum | ||
* Check if a unit is AI | ||
* | ||
* Arguments: | ||
* 0: The Unit <OBJECT> | ||
* | ||
* ReturnValue: | ||
* Is AI <BOOL> | ||
* | ||
* Example: | ||
* [player] call ace_medical_fnc_isAI | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
|
||
params ["_unit"]; | ||
private _return = 0; | ||
|
||
if (isPlayer _unit) then { | ||
_return=0; | ||
else { | ||
_return=1; | ||
}; | ||
_return |