Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. /* 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 */
  2. #include "basicdefines_A3.hpp"
  3. #include "cfgPatches.hpp"
  4.  
  5. class CfgVehicles
  6. {
  7. // Parent class declarations
  8. class House;
  9. class House_F: House
  10. {
  11. class DestructionEffects;
  12. };
  13. class Ruins_F;
  14.  
  15. // Class of the house in good state
  16. class Land_IC3_RepairStation: House_F
  17. {
  18. scope = 2; // 2 = public = shown in editor
  19. displayName = "IC3 RepairStation"; // Name in editor
  20. model = \IC3_RepairStation\Land_IC3_RepairStation.p3d; // Path to model
  21.  
  22. vehicleClass = Structures; // category in editor; "Structures" value is a class defined in CfgVehicleClasses
  23. mapSize = 20.27; // Scale of icon in editor
  24. cost = 40000; // Score penalty for destroying the house
  25.  
  26. class MarkerLights {};
  27.  
  28. class HitPoints {};
  29. class Damage {};
  30. class AnimationSources
  31. {
  32. // Animation sources for doors
  33. class Door_1_source
  34. {
  35. source = user; // "user" = custom source = not controlled by some engine value
  36. initPhase = 0; // Initial value of animations based on this source
  37. animPeriod = 1; // Coefficient for duration of change of this animation
  38. sound = "GenericDoorsSound"; /// Selects sound class from CfgAnimationSourceSounds that is going to be used for sounds of doors
  39. };
  40. class Door_2_source: Door_1_source {};
  41. };
  42. // 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)
  43. class UserActions
  44. {
  45. class door_1_open
  46. {
  47. displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
  48. displayName = "Tür Öffnen";
  49. position = "door_1_trigger";
  50. radius = 2;
  51. onlyForplayer = "true";
  52. condition="((this animationPhase 'door_1_rot') < 0.5)";
  53. statement="this animate [""door_1_rot"", 1]; this animate [""door_2_rot"", 1]";
  54. };
  55. class door_1_close : door_1_open
  56. {
  57. displayName="Tür schließen";
  58. condition="((this animationPhase 'door_1_rot') == 1)";
  59. statement="this animate [""door_1_rot"", 0]; this animate [""door_2_rot"", 0]";
  60. };
  61.  
  62. class door_2_open
  63. {
  64. displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
  65. displayName = "Tür Öffnen";
  66. position = "door_2_trigger";
  67. radius = 2;
  68. onlyForplayer = "true";
  69. condition="((this animationPhase 'door_3_rot') < 0.5)";
  70. statement="this animate [""door_3_rot"", 1]; this animate [""door_4_rot"", 1]";
  71. };
  72. class door_2_close : door_2_open
  73. {
  74. displayName="Tür schließen";
  75. condition="((this animationPhase 'door_3_rot') == 1)";
  76. statement="this animate [""door_3_rot"", 0]; this animate [""door_4_rot"", 0]";
  77. };
  78. };
  79. // Amount of doors of this house; a parameter for easy processing of all doors on different houses by scripts.
  80. numberOfDoors = 15;
  81. };
  82. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement