Richards.D 761 Posted September 15, 2012 I've been working on a few buildings now, and I have run accross an issue on animating doors. Gnat has a brilliant tutorial, sadly the pictures are now all 404 Making it difficult to follow. I also have one from OFP, but most of that has changed slightly in terms of the configs, so it is not much use. I have done the following: 1. Made the model (herp derp of course) 2. Ensured that the doors WERE Separate components, and named correctly. 3. Added points of rotation for the door in the Memory LOD. 4. Added the config files.. but it does not work. PHOTOS/OTHER INFO CONFIG.CPP class CfgPatches { class dar_structures { units[] = {"DAR_station"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CAData"}; }; }; class CfgVehicleClasses { class dar_structures { displayName = "DAR Structures"; }; }; class CfgVehicles { class House; class DAR_Station: House//Wall { scope = 2; displayName = "Police Station"; vehicleClass = "dar_structures"; model = "\dar_station\dar_station.p3d"; mapSize = 0.2; cost = 1000; armor = 50000; destrType = "DestructNo"; }; }; MODEL.CFG class CfgModels { class House; class DAR_Station: House { sectionsInherit=""; skeletonName = "DAR_StationBones"; sections[] = { }; class Animations { class Animatedoor1 { type="rotation"; source="Userdoor1"; sourceAddress = "clamp"; selection="door1"; axis="AXIS_door1"; memory=1; angle0="rad 0"; angle1="rad 22"; minValue=0.000; maxValue=1.000; }; }; }; }; https://dl.dropbox.com/u/23389642/ScreenHunter_03%20Sep.%2015%2016.31.jpg (280 kB) https://dl.dropbox.com/u/23389642/ScreenHunter_04%20Sep.%2015%2016.32.jpg (275 kB) https://dl.dropbox.com/u/23389642/ScreenHunter_05%20Sep.%2015%2016.32.jpg (297 kB) Thank you gentlemen in advance.. hopefully I can finally roll this sucker out after having it on the back burner for a few months.. Share this post Link to post Share on other sites
[frl]myke 14 Posted September 15, 2012 Wrong selection names used for the door and the axis: [color=#000000][color=#007700] [/color][color=#0000BB]selection[/color][color=#007700]=[/color][color=#DD0000]"door1"[/color][color=#007700]; [/color][color=#0000BB]axis[/color][color=#007700]=[/color][color=#DD0000]"AXIS_door1"[/color][color=#007700]; [/color][/color] Either change the names in the model or (what is probably faster done) in the model.cfg. In the model the selection is named "front1" but in the cfg "door1". Same with axis. Share this post Link to post Share on other sites
Richards.D 761 Posted September 15, 2012 Alright, modified the model.cfg Did you see any other issues? Share this post Link to post Share on other sites
[frl]myke 14 Posted September 15, 2012 Afaik there is no source "userdoor1" but i never made buildings. I guess it should be source = "user" but not sure about that. Maybe this here helps: https://community.bistudio.com/wiki/model.cfg Share this post Link to post Share on other sites
Sealife 22 Posted September 15, 2012 class AnimationSources { /* name must be identical to the one given by the model.cfg ("Open_Door")" */ class Open_door { source = "user"; animPeriod = 4; /* duration in seconds */ initPhase = 0; }; }; from mondkalb tute on wiki You miss it from your cpp , in your case it is class animatedoor1 and thus source in model.cfg is usually same but not necessary as long as animationsource class and source in cpp match source in model.cfg you be ok Share this post Link to post Share on other sites
Richards.D 761 Posted September 16, 2012 So, Do I add that into the model.cfg or the config.cpp? Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 16, 2012 class AnimationSources goes in the config.cpp Share this post Link to post Share on other sites
Richards.D 761 Posted September 16, 2012 How does this look gentlemen? CONFIG.CPP class CfgPatches { class dar_structures { units[] = {"DAR_station"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CAData"}; }; }; class CfgVehicleClasses { class dar_structures { displayName = "DAR Structures"; }; }; class CfgVehicles { class House; class DAR_Station: House//Wall { scope = 2; displayName = "Police Station"; vehicleClass = "dar_structures"; model = "\dar_station\dar_station.p3d"; mapSize = 0.2; cost = 1000; armor = 50000; destrType = "DestructNo"; }; }; Class AnimationSources { class Animatedoor1 { source = "userfront1"; animPeriod = 4; /* duration in seconds */ initPhase = 0; }; }; MODEL.CFG class CfgModels { class House; class DAR_Station: House { sectionsInherit=""; skeletonName = "DAR_StationBones"; sections[] = { }; class Animations { class Animatedoor1 { type="rotation"; source="Userfront1"; sourceAddress = "clamp"; selection="front1"; axis="AXIS_front1"; memory=1; angle0="rad 0"; angle1="rad 22"; minValue=0.000; maxValue=1.000; }; }; }; }; Share this post Link to post Share on other sites
scars09 9 Posted September 17, 2012 my door is called sdoor it needs a entry in cfgskeletons as bone of the building/object it is used in, in my case the object is called sc9_safe. Note that the bone name is identical to the selectionname of the doormodel - sdoor class CfgSkeletons { class Vehicle; // External class reference class sc9_safebones { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {"sdoor", ""}; }; }; in cfgmodel it needs to be in sectionlist of the building/object its is used in and the animation has to be defined. Please note that the animation aswell is named sdoor. the source "opensafe" is defined in the config.cpp class CfgModels { class house; // External class reference class sc9_safe : house { skeletonName = "sc9_safebones"; sectionsInherit = ""; sections[] = {"sdoor"}; class Animations { class sdoor { type = "rotation"; animPeriod = 1; source = "opensafe"; selection = "sdoor"; minValue = 0; maxValue = 1; axis = "safeaxis"; angle0 = 0; angle1 = 1.25; offset0 = 0; offset1 = 1; }; }; }; }; in the config.cpp u have to define the user animationsource and a user action to be able to use the door class sc9_safe : house { scope = public; model = "\SC9_adarab\sc9_safe.p3d"; vehicleClass = "sc9_aads"; displayName = "old safe"; accuracy = 0.02; class AnimationSources { class opensafe { source = "user"; animPeriod = 1; initPhase = 0; }; }; class UserActions { class Open_safe { displayName = "open the old safe"; position = "knopp"; radius = 1.2; onlyForPlayer = 0; condition = "this animationPhase ""sdoor"" <= 0.1"; statement = " this animate [""sdoor"",1]"; }; class Close_safe { displayName = "close the old safe"; position = "knopp"; radius = 1.2; onlyForPlayer = 0; condition = "this animationPhase ""sdoor"" >= 0.9"; statement = " this animate [""sdoor"",0]"; }; }; }; hope that helps, use the selectionname the door has in O2 for everything except for the user animationsource Share this post Link to post Share on other sites