Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This is a sample of a house with two stage destruction (a damaged version and a ruin), two destructible parts, five doors and eight windows */
- #include "basicdefines_A3.hpp"
- #include "cfgPatches.hpp"
- class CfgVehicles
- {
- // Parent class declarations
- class House;
- class House_F: House
- {
- class DestructionEffects;
- };
- class Ruins_F;
- // Class of the house in good state
- class Land_IC3_RepairStation: House_F
- {
- scope = 2; // 2 = public = shown in editor
- displayName = "IC3 RepairStation"; // Name in editor
- model = \IC3_RepairStation\Land_IC3_RepairStation.p3d; // Path to model
- vehicleClass = Structures; // category in editor; "Structures" value is a class defined in CfgVehicleClasses
- mapSize = 20.27; // Scale of icon in editor
- cost = 40000; // Score penalty for destroying the house
- class MarkerLights {};
- class HitPoints {};
- class Damage {};
- class AnimationSources
- {
- // Animation sources for doors
- class Door_1_source
- {
- source = user; // "user" = custom source = not controlled by some engine value
- initPhase = 0; // Initial value of animations based on this source
- animPeriod = 1; // Coefficient for duration of change of this animation
- sound = "GenericDoorsSound"; /// Selects sound class from CfgAnimationSourceSounds that is going to be used for sounds of doors
- };
- class Door_2_source: Door_1_source {};
- };
- // This section defined custom actions for action menu. Each class defined here represent one action. Here we have Open+Close pairs of action for each door (1-5)
- class UserActions
- {
- class door_1_open
- {
- displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
- displayName = "Tür Öffnen";
- position = "door_1_trigger";
- radius = 2;
- onlyForplayer = "true";
- condition="((this animationPhase 'door_1_rot') < 0.5)";
- statement="this animate [""door_1_rot"", 1]; this animate [""door_2_rot"", 1]";
- };
- class door_1_close : door_1_open
- {
- displayName="Tür schließen";
- condition="((this animationPhase 'door_1_rot') == 1)";
- statement="this animate [""door_1_rot"", 0]; this animate [""door_2_rot"", 0]";
- };
- class door_2_open
- {
- displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
- displayName = "Tür Öffnen";
- position = "door_2_trigger";
- radius = 2;
- onlyForplayer = "true";
- condition="((this animationPhase 'door_3_rot') < 0.5)";
- statement="this animate [""door_3_rot"", 1]; this animate [""door_4_rot"", 1]";
- };
- class door_2_close : door_2_open
- {
- displayName="Tür schließen";
- condition="((this animationPhase 'door_3_rot') == 1)";
- statement="this animate [""door_3_rot"", 0]; this animate [""door_4_rot"", 0]";
- };
- };
- // Amount of doors of this house; a parameter for easy processing of all doors on different houses by scripts.
- numberOfDoors = 15;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement