handleDamage EH for the HuntIR

This commit is contained in:
ulteq 2015-06-12 18:01:53 +02:00
parent eff31db128
commit 4b0c4b9dd6
4 changed files with 56 additions and 0 deletions

View File

@ -3,6 +3,7 @@
ADDON = false;
PREP(cam);
PREP(handleDamage);
PREP(handleFired);
PREP(huntir);
PREP(huntirCompass);

View File

@ -0,0 +1,29 @@
class CfgModels
{
class Default
{
sectionsInherit="";
sections[]={};
skeletonName="";
};
class ACE_HuntIR: Default
{
sectionsInherit="Default";
sections[]={};
skeletonName="ACE_HuntIR_Skeleton";
};
};
class CfgSkeletons
{
class Default
{
isDiscrete=1;
skeletonInherit="";
skeletonBones[]={};
};
class ACE_HuntIR_Skeleton: Default
{
skeletonInherit="Default";
skeletonBones[]={};
};
};

View File

@ -0,0 +1,25 @@
/*
* Author: Ruthberg
*
* Handles huntir damage
*
* Arguments:
* 0: huntir <OBJECT>
* 1: selectionName <STRING>
* 2: damage <NUMBER>
* 3: source <OBJECT>
* 4: projectile <STRING>
*
* Return Value:
* Nothing
*
* Return value:
* None
*/
#include "script_component.hpp"
PARAMS_5(_huntir,_selectionName,_damage,_source,_projectile);
systemChat format["Selection: %1; Damage: %2", _selectionName, _damage];
_damage

View File

@ -31,6 +31,7 @@ if (_ammo != "F_HuntIR") exitWith {};
private ["_huntir"];
_huntir = createVehicle ["ACE_HuntIR", _position, [], 0, "FLY"];
_huntir setPosATL _position;
_huntir addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
[{
EXPLODE_1_PVT(_this select 0,_huntir);
if (isNull _huntir) exitWith {