Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Extended event handlers by Solus and Killswitch
- class CfgPatches
- {
- class Extended_EventHandlers
- {
- units[]={};
- requiredVersion = 0.1;
- requiredAddons[] = {"CACharacters","CAWeapons","CAWeapons3","CAAir"};
- SLX_XEH2_Version = 1.3;
- };
- // This is for backwards compatibility with the two older addons,
- // whose CfgPatches names might have snuck into mission.sqm's or
- // been used as requiredAddons by other addons.
- class Extended_Init_EventHandlers
- {
- units[] = {};
- requiredVersion = 0.1;
- requiredAddons[] = {};
- };
- class Extended_Fired_EventHandlers
- {
- units[] = {};
- requiredVersion = 0.1;
- requiredAddons[] = {};
- };
- };
- class CfgAddons
- {
- class PreloadAddons
- {
- class Extended_EventHandlers
- {
- list[]={"Extended_EventHandlers"};
- };
- };
- };
- // Base event handlers class for CfgVehicles class EventHandlers to inherit.
- class Extended_EventHandlers
- {
- // Here are the init and fired event handlers from the original two addons
- init = "[_this select 0,""Extended_Init_EventHandlers""] call compile preprocessFile ""\Extended_EventHandlers\Init.sqf"";if(isNil 'XEH_temp')then{XEH_temp=true;execVM '\Extended_EventHandlers\temp.sqf'}";
- // Get the shot fired, then put the info and the shot in an array and exec the getVariable Extended_FiredEH compiled scripts/functions.
- fired = "_shot=nearestObject[_this select 0,_this select 4];[_this select 0,_this select 1,_this select 2,_this select 3,_this select 4,_shot]call((_this select 0)getVariable""Extended_FiredEH"")";
- // Here follows the other ArmA events and their event handlers.
- animChanged = "_this call ((_this select 0) getVariable ""Extended_AnimChangedEH"")";
- animDone = "_this call ((_this select 0) getVariable ""Extended_AnimDoneEH"")";
- dammaged = "_this call ((_this select 0) getVariable ""Extended_DammagedEH"")";
- engine = "_this call ((_this select 0) getVariable ""Extended_EngineEH"")";
- fuel = "_this call ((_this select 0) getVariable ""Extended_FuelEH"")";
- gear = "_this call ((_this select 0) getVariable ""Extended_GearEH"")";
- getIn = "_this call ((_this select 0) getVariable ""Extended_GetInEH"")";
- getOut = "_this call ((_this select 0) getVariable ""Extended_GetOutEH"")";
- hit = "_this call ((_this select 0) getVariable ""Extended_HitEH"")";
- incomingMissile = "_this call ((_this select 0) getVariable ""Extended_IncomingMissileEH"")";
- killed = "_this call ((_this select 0) getVariable ""Extended_KilledEH"")";
- landedTouchDown = "_this call ((_this select 0) getVariable ""Extended_LandedTouchDownEH"")";
- landedStopped = "_this call ((_this select 0) getVariable ""Extended_LandedStoppedEH"")";
- };
- // Extended EH classes, where new events are defined.
- class Extended_Init_EventHandlers
- {
- // Default Extended Event Handlers: Add extended event handlers to compile code.
- class All
- {
- // Compile code for other EHs to run and put them in the setVariable.
- // Set up code for the remaining event handlers too...
- SLX_Init_Other_All="_this call compile preprocessFile""\Extended_EventHandlers\InitOthers.sqf"";";
- };
- };
- class Extended_Fired_EventHandlers
- {
- };
- class Extended_AnimChanged_EventHandlers
- {
- };
- class Extended_AnimDone_EventHandlers
- {
- };
- class Extended_Dammaged_EventHandlers
- {
- };
- class Extended_Engine_EventHandlers
- {
- };
- class Extended_Fuel_EventHandlers
- {
- };
- class Extended_Gear_EventHandlers
- {
- };
- class Extended_GetIn_EventHandlers
- {
- };
- class Extended_GetOut_EventHandlers
- {
- };
- class Extended_Hit_EventHandlers
- {
- };
- class Extended_IncomingMissile_EventHandlers
- {
- };
- class Extended_Killed_EventHandlers
- {
- };
- class Extended_LandedTouchDown_EventHandlers
- {
- };
- class Extended_LandedStopped_EventHandlers
- {
- };
- // Make event handler classes inherit extended event handlers.
- class CfgVehicles
- {
- class All;
- class Air;
- class Man;
- class AllVehicles: All
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- class CAManBase: Man
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- class Helicopter: Air
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- class Plane: Air
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- class ParachuteBase: Helicopter
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- class AV8B: Plane
- {
- class EventHandlers : Extended_EventHandlers {};
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment