Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Note: this model config is created with 4-space [tab] symbols. If you use different settings, the structure may not be as clear.
- class CfgSkeletons
- {
- class Default
- {
- isDiscrete = 1;
- skeletonInherit = "";
- skeletonBones[] = {};
- };
- // Skeleton of undamaged variant of the house, containing doors and windows. Note that glass #3 is not a window but the glass pane of glass door (door #1). Therefore
- // (similar to door handles) it's bones need to be appropriately linked to bones of the door so that it moves along with it when the door is opened/closed.
- class Hopital_Zoko_1_skeleton: Default
- {
- skeletonInherit = "Default";
- skeletonBones[] =
- {
- // Pairs: 1st is newly defined bone, second is it`s "parent" in the skeleton (bone hierarchy).
- "Door_1", "",
- "Door_2", "",
- "Door_Handle_2", "Door_2", // Door handle is linked to the door itself so that it moves with the door when the door is opened or closed.
- "Door_Handle_2_axis", "Door_2", // Same goes for the axis around which rotates the handle itself.
- "Door_3", "",
- "Door_Handle_3", "Door_3",
- "Door_Handle_3_axis", "Door_3",
- "Door_4", "",
- "Door_Handle_4", "Door_4",
- "Door_Handle_4_axis", "Door_4",
- "Door_5", "",
- "Door_Handle_5", "Door_5",
- "Door_Handle_5_axis", "Door_5",
- "Glass_1_hide", "",
- "Glass_1_unhide", "",
- "Glass_2_hide", "",
- "Glass_2_unhide", "",
- "Glass_3", "Door_1",
- "Glass_3_hide", "Door_1",
- "Glass_3_unhide", "Door_1",
- "Glass_3_effects", "Door_1",
- "Glass_4_hide", "",
- "Glass_4_unhide", "",
- "Glass_5_hide", "",
- "Glass_5_unhide", "",
- "Glass_6_hide", "",
- "Glass_6_unhide", "",
- "Glass_7_hide", "",
- "Glass_7_unhide", "",
- "Glass_8_hide", "",
- "Glass_8_unhide", ""
- };
- };
- // Skeleton of damaged variant of the house. It has no bones for windows (since all windows are destroyed); on the other hand it has bones for destroyable parts (Dam_#) and their rubble (Unhide_#).
- // Doors are bound to these destroyable parts of they are part of them, so that they are hidden together by one animation.
- class Test_House_01_dam_F_skeleton: Default
- {
- skeletonInherit = "Default";
- skeletonBones[] =
- {
- "Dam_1", "",
- "Unhide_1", "",
- "Dam_2", "",
- "Unhide_2", "",
- "Door_1", "Dam_2",
- "Door_2", "Dam_2",
- "Door_Handle_2", "Door_2",
- "Door_Handle_2_axis", "Door_2",
- "Door_3", "",
- "Door_Handle_3", "Door_3",
- "Door_Handle_3_axis", "Door_3",
- "Door_4", "Dam_1",
- "Door_Handle_4", "Door_4",
- "Door_Handle_4_axis", "Door_4",
- "Door_5", "",
- "Door_Handle_5", "Door_5",
- "Door_Handle_5_axis", "Door_5"
- };
- };
- };
- class CfgModels
- {
- class Default
- {
- sectionsInherit = "";
- sections[] = {};
- skeletonName = "";
- };
- class Hopital_Zoko_1: Default // class name must be the same as name of p3d
- {
- skeletonName = "Hopital_Zoko_1_skeleton"; // Set to use above defined skeleton.
- sections[] =
- {
- // Selections from the model that are used in config.cpp for switching textures and materials.
- "DamT_1",
- "Glass_1_hide",
- "Glass_2_hide",
- "Glass_3_hide",
- "Glass_4_hide",
- "Glass_5_hide",
- "Glass_6_hide",
- "Glass_7_hide",
- "Glass_8_hide"
- };
- sectionsInherit = "";
- class Animations
- {
- // Animation for rotating door #1 (without a door handle)
- class Door_1_rot
- {
- type = rotation;
- source = Door_1_source; // Controler defined in class AnimationSources in config.cpp.
- selection = Door_1; // Selection from p3d that also has to be defined as a bone in this model`s skeleton.
- axis = Door_1_axis; // Axis of the rotation.
- memory = 1;
- minValue = 0; // Value of the controller at which the rotation will be angle0
- maxValue = 1; // Value of the controller at which the rotation will be angle1
- angle0 = 0;
- angle1 = (rad 110); // "rad" converts from degrees to radians
- };
- // Animation for door #2 (with a door handle). Note that when door is being closed, the animations run in reverse.
- class Door_2_rot: Door_1_rot
- {
- source = Door_2_source;
- selection = Door_2;
- axis = Door_2_axis;
- minValue = 0.1; // Rotation of door starts at 0.1 instead of 0, because from 0 to 0.1 the handle is pressed down.
- angle1 = -(rad 120);
- };
- class Door_Handle_2_rot_1: Door_2_rot
- {
- selection = Door_Handle_2;
- axis = Door_Handle_2_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50); // Press handle down
- };
- class Door_Handle_2_rot_2: Door_Handle_2_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50); // Release handle to go up
- };
- // Animation for door #3
- class Door_3_rot: Door_1_rot
- {
- source = Door_3_source;
- selection = Door_3;
- axis = Door_3_axis;
- minValue = 0.1;
- angle1 = (rad 110);
- };
- class Door_Handle_3_rot_1: Door_3_rot
- {
- selection = Door_Handle_3;
- axis = Door_Handle_3_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_3_rot_2: Door_Handle_3_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- // Animation for door #4
- class Door_4_rot: Door_1_rot
- {
- source = Door_4_source;
- selection = Door_4;
- axis = Door_4_axis;
- minValue = 0.1;
- angle1 = -(rad 140);
- };
- class Door_Handle_4_rot_1: Door_4_rot
- {
- selection = Door_Handle_4;
- axis = Door_Handle_4_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_4_rot_2: Door_Handle_4_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- // Animation for door #5
- class Door_5_rot: Door_1_rot
- {
- source = Door_5_source;
- selection = Door_5;
- axis = Door_5_axis;
- minValue = 0.1;
- angle1 = -(rad 110);
- };
- class Door_Handle_5_rot_1: Door_5_rot
- {
- selection = Door_Handle_5;
- axis = Door_Handle_5_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_5_rot_2: Door_Handle_5_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- // Animations for window #1. One that hides faces of full glass pane when window is destroyed and second that shows faces with just shards of glass around the window frame when the window is destroyed.
- class Glass_1_hide
- {
- type = hide;
- source = Glass_1_source; // This source is defined in config.cpp and relates health of the window (0 = fine, 1 = destroyed)
- selection = Glass_1_hide; // Selection containing glass pane.
- minValue = 0;
- maxValue = 1;
- hideValue = 0.99999; // Threshold for switching the glass pane for glass shards.
- };
- class Glass_1_unhide: Glass_1_hide
- {
- selection = Glass_1_unhide; // Selection containing glass shards.
- hideValue = 0; // Glass shards are hidden when the window is ok...
- unhideValue = 0.99999; // ...and are shown when damage done to the window reaches set threshold.
- };
- // Here follow animations for the rest of the windows, inherited from the first one.
- class Glass_2_hide: Glass_1_hide
- {
- source = Glass_2_source;
- selection = Glass_2_hide;
- };
- class Glass_2_unhide: Glass_1_unhide
- {
- source = Glass_2_source;
- selection = Glass_2_unhide;
- };
- class Glass_3_hide: Glass_1_hide
- {
- source = Glass_3_source;
- selection = Glass_3_hide;
- };
- class Glass_3_unhide: Glass_1_unhide
- {
- source = Glass_3_source;
- selection = Glass_3_unhide;
- };
- class Glass_4_hide: Glass_1_hide
- {
- source = Glass_4_source;
- selection = Glass_4_hide;
- };
- class Glass_4_unhide: Glass_1_unhide
- {
- source = Glass_4_source;
- selection = Glass_4_unhide;
- };
- class Glass_5_hide: Glass_1_hide
- {
- source = Glass_5_source;
- selection = Glass_5_hide;
- };
- class Glass_5_unhide: Glass_1_unhide
- {
- source = Glass_5_source;
- selection = Glass_5_unhide;
- };
- class Glass_6_hide: Glass_1_hide
- {
- source = Glass_6_source;
- selection = Glass_6_hide;
- };
- class Glass_6_unhide: Glass_1_unhide
- {
- source = Glass_6_source;
- selection = Glass_6_unhide;
- };
- class Glass_7_hide: Glass_1_hide
- {
- source = Glass_7_source;
- selection = Glass_7_hide;
- };
- class Glass_7_unhide: Glass_1_unhide
- {
- source = Glass_7_source;
- selection = Glass_7_unhide;
- };
- class Glass_8_hide: Glass_1_hide
- {
- source = Glass_8_source;
- selection = Glass_8_hide;
- };
- class Glass_8_unhide: Glass_1_unhide
- {
- source = Glass_8_source;
- selection = Glass_8_unhide;
- };
- };
- };
- // This class represents the damage version. It has the same door animations, misses the window animations and has
- class Test_House_01_dam_F: Default
- {
- skeletonName = "Test_House_01_dam_F_skeleton"; // Uses skeleton for damage version.
- sections[] = {}; // No sections are needed at this stage.
- sectionsInherit = "";
- class Animations
- {
- // Animations for destructible parts. They are very similar to the glass animations above; only using different selections (= bones) and animation sources.
- class Hitzone_1_hide
- {
- type = hide;
- source = Hitzone_1_source;
- selection = Dam_1;
- minValue = 0;
- maxValue = 1;
- hideValue = 0.99999;
- };
- class Hitzone_1_unhide: Hitzone_1_hide
- {
- selection = Unhide_1;
- hideValue = 0;
- unhideValue = 0.99999;
- };
- class Hitzone_2_hide: Hitzone_1_hide
- {
- source = Hitzone_2_source;
- selection = Dam_2;
- };
- class Hitzone_2_unhide: Hitzone_2_hide
- {
- selection = Unhide_2;
- hideValue = 0;
- unhideValue = 0.99999;
- };
- // Door animations, same as for the undamaged version of the house defined above.
- class Door_1_rot
- {
- type = rotation;
- source = Door_1_source;
- selection = Door_1;
- axis = Door_1_axis;
- memory = 1;
- minValue = 0;
- maxValue = 1;
- angle0 = 0;
- angle1 = (rad 110);
- };
- class Door_2_rot: Door_1_rot
- {
- source = Door_2_source;
- selection = Door_2;
- axis = Door_2_axis;
- minValue = 0.1;
- angle1 = -(rad 120);
- };
- class Door_Handle_2_rot_1: Door_2_rot
- {
- selection = Door_Handle_2;
- axis = Door_Handle_2_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_2_rot_2: Door_Handle_2_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- class Door_3_rot: Door_1_rot
- {
- source = Door_3_source;
- selection = Door_3;
- axis = Door_3_axis;
- minValue = 0.1;
- angle1 = (rad 110);
- };
- class Door_Handle_3_rot_1: Door_3_rot
- {
- selection = Door_Handle_3;
- axis = Door_Handle_3_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_3_rot_2: Door_Handle_3_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- class Door_4_rot: Door_1_rot
- {
- source = Door_4_source;
- selection = Door_4;
- axis = Door_4_axis;
- minValue = 0.1;
- angle1 = -(rad 140);
- };
- class Door_Handle_4_rot_1: Door_4_rot
- {
- selection = Door_Handle_4;
- axis = Door_Handle_4_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_4_rot_2: Door_Handle_4_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- class Door_5_rot: Door_1_rot
- {
- source = Door_5_source;
- selection = Door_5;
- axis = Door_5_axis;
- minValue = 0.1;
- angle1 = -(rad 110);
- };
- class Door_Handle_5_rot_1: Door_5_rot
- {
- selection = Door_Handle_5;
- axis = Door_Handle_5_axis;
- minValue = 0;
- maxValue = 0.1;
- angle1 = -(rad 50);
- };
- class Door_Handle_5_rot_2: Door_Handle_5_rot_1
- {
- minValue = 0.1;
- maxValue = 0.4;
- angle1 = (rad 50);
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement