Extract civilans from vehicles, rmeoved actions from civilians in vehicles

This commit is contained in:
dixon13 2015-12-23 00:19:41 -07:00
parent d36543d3a9
commit 1aa192f7e0
5 changed files with 36 additions and 5 deletions

View File

@ -148,6 +148,13 @@ class CfgVehicles {
showDisabled = 0;
priority = 2.5;
};
class ACE_Unload {
displayName = CSTRING(ExtractFromVehicle);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canInteractWithCivilianVehicle));
statement = QUOTE([ARR_2(_target,vehicle _target)] call EFUNC(common,unloadPersonLocal));
showDisabled = 0;
priority = 2.6;
}
};
class ACE_Torso {
@ -485,7 +492,7 @@ class CfgVehicles {
};
};
};
class StaticMGWeapon: StaticWeapon {};
class HMG_01_base_F: StaticMGWeapon {};

View File

@ -15,6 +15,7 @@ PREP(hideMouseHint);
// interaction with units
PREP(canInteractWithCivilian);
PREP(canInteractWithCivilianVehicle);
PREP(getDown);
PREP(sendAway);
PREP(canJoinGroup);

View File

@ -1,6 +1,6 @@
/*
* Author: commy2
* Checks if the unit can interact with civilian
* Checks if the unit can interact with civilian on foot
*
* Arguments:
* 0: Unit <OBJECT>
@ -18,5 +18,4 @@
#include "script_component.hpp"
params ["_unit", "_target", ["_isCivilian", true]];
alive _target && [side _target != side _unit, side group _target == civilian] select _isCivilian // return
alive _target && isNull objectParent _target && [side _target != side _unit, side group _target == civilian] select _isCivilian // return

View File

@ -0,0 +1,21 @@
/*
* Author: commy2 && dixon13
* Checks if the unit can interact with civilian on in vehicle
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Target <OBJECT>
* 2: Target has to be on the civilian side (default: true) <BOOL>
*
* Return Value:
* Able to interact with civilian <BOOL>
*
* Example:
* [target] call ace_interaction_fnc_canInteractWithCivilianVehicle
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_target", ["_isCivilian", true]];
alive _target && !isNull objectParent _target && [side _target != side _unit, side group _target == civilian] select _isCivilian // return

View File

@ -349,6 +349,9 @@
<Portuguese>Abaixe-se!</Portuguese>
<Italian>A terra!</Italian>
</Key>
<key ID="STR_ACE_Interaction_ExtractFromVehicle">
<English>Extract from vehicle</English>
</key>
<Key ID="STR_ACE_Interaction_TeamManagement">
<English>Team Management</English>
<German>Gruppenverwaltung</German>
@ -717,4 +720,4 @@
<Polish>Pokaż interakcję "podaj magazynek"</Polish>
</Key>
</Package>
</Project>
</Project>