Jump to content
Sign in to follow this  
Richards.D

Animated Doors - Assistance

Recommended Posts

Hello gentlemen:

Working on a second project. I've been building static structures with excellent success for months now, and have quite a few working correctly. I want to move into animations in my structures, and the simplest of those is animated doors. Before I jumped right in to a structure and began to attempt to animate it, I thought it would be best to make a extremely simple test model: not even geo LOD, just for animation testing.

I won't upload this, it is so simple these screenshots can accurately portray it.

0 LOD:

https://dl.dropbox.com/u/23389642/ScreenHunter_28%20Jan.%2020%2022.28.jpg

Memory LOD:

https://dl.dropbox.com/u/23389642/ScreenHunter_29%20Jan.%2020%2022.29.jpg

Now, I believe as I did some tutorials that this should be just fine for even a simple door model.

Now.. the dreaded config. This is I assume where issues are being encountered. I use the OFP Tutorials website, which has excellent tips on the model and getting it correctly configured. Unfortunately, the config files provided for OFP do not work with A2, so this always leaves me guessing. I've written up a few based on my examination of various models with the exact working thing: Interact-able opening doors.

So.. I present all the non-working config files.

This first one was from a TCG SWAT Base.. it was so simple I thought "There is NO way this won't work.. wrong"

// config.bin - 18:14:29 01/20/13, generated in 0.01 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define true	1
#define false	0

class CfgPatches {
class dar_testing {
	units[] = {"dar_testing"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAData"};
};
};

class CfgVehicleClasses {
class dar_testing {
	displayName = "TESTING";
};
};

class CfgVehicles {
class House;	// External class reference

class dar_testing : House {
	scope = public;
	model = "\dar_animtesting\TUT_Door_3x3m.p3d";
	mapSize = 10;
	displayName = "TESTING";
	vehicleClass = "dar_testing";
	nameSound = "Building";
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	animated = false;

	class EventHandlers {};

	class AnimationSources {
		class slow_func {
			source = "user";
			animPeriod = 2;
			initPhase = 0;
		};
	};
	cost = 0;
	armor = 1000000000;

	class UserActions {
		class Opendoor1 {
			displayName = "Open Door";
			position = "pos_switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door1"" < 0.5";
			statement = "this animate [""door"",1]; this say ""dooropen""";
		};

		class Closedoor1 {
			displayName = "Close Door";
			position = "pos_switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door1"" >= 0.5";
			statement = "this animate [""door"",0]; this say ""doorclose""; this setDammage 0";
	};
};
};

This one is from Island Life.. I didn't edit this one at all.. no credit as to who made this as it didn't come with any readme, and It didn't seem to say anywhere on the model, (but I do not plan to use the model, so it shouldn't be a big deal), but it works absolutely brilliantly on their model.. I think if I knew how to integrate what I have and remove all the doors but one on this.. I might have some luck, as this one is very promising.

// config.bin - 16:57:14 01/20/13, generated in 0.02 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define true	1
#define false	0

class CfgVehicleClasses {
class IL_Buildings {
	displayName = "IL Buildings";
};
};

class CfgPatches {
class IL_Buildings {
	units[] = {"policehq"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};

class CfgSkeletons {
class Default;	// External class reference
class Strategic;	// External class reference

class policehqBones : Strategic {
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = {"cellA", "", "cellAswitch", "cellA", "cellB", "", "cellBswitch", "cellB", "tankA", "", "tankAswitch", "tankA", "tankB", "", "tankBswitch", "tankB", "crdoor", "", "crdoorswitch", "crdoor", "intakeD", "", "intakeDaxis", "", "intakeDswitch", "intakeD", "jdoor", "", "jdoorswitch", "jdoor", "preRdoor", "", "preRdoorswitch", "preRdoor", "rdoor", "", "rdoorswitch", "rdoor", "armoryD", "", "armoryDswitch", "armoryD", "bdoor", "", "bdoorwitch", "bdoor", "bookingG", "", "bookingGswitch", "bookingG", "bookingGaxis", "", "yardGdoor", "", "yardGdoorswitch", "yardGdoor", "door1", "", "door1switch", "door1", "door2", "", "door2switch", "door2", "door3", "", "door3switch", "door3", "door4", "", "door4switch", "door4"};
};
};
class Rotation;	// External class reference

class CfgModels {
class Default {
	sections[] = {""};
	sectionsInherit = "";
};

class Strategic : Default {};

class policehq : Strategic {
	sectionsInherit = "";
	sections[] = {};
	skeletonName = "policehqBones";

	class Animations {
		class cellA {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "cellA";
			axis = "cellAaxis";
			angle0 = 0;
			angle1 = 0.04;
		};

		class cellB {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "cellB";
			axis = "cellBaxis";
			angle0 = 0;
			angle1 = 0.04;
		};

		class tankA {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "tankA";
			axis = "tankAaxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class tankB {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "tankB";
			axis = "tankBaxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class bookingG {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "bookingG";
			axis = "bookingGaxis";
			angle0 = 0;
			angle1 = 0.09;
		};

		class crdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "crdoor";
			axis = "crdooraxis";
			angle0 = 0;
			angle1 = 0.033;
		};

		class intakeD {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "intakeD";
			axis = "intakeDaxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class jdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "jdoor";
			axis = "jdooraxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class preRdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "preRdoor";
			axis = "preRdooraxis";
			angle0 = 0;
			angle1 = 0.043;
		};

		class rdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "rdoor";
			axis = "rdooraxis";
			angle0 = 0;
			angle1 = 0.036;
		};

		class yardGdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "yardGdoor";
			axis = "yardGdooraxis";
			angle0 = 0;
			angle1 = 0.04;
		};

		class armoryD {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "armoryD";
			axis = "armoryDaxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class bdoor {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "bdoor";
			axis = "bdooraxis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class door1 {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "door1";
			axis = "door1axis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class door2 {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "door2";
			axis = "door2axis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class door3 {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "door3";
			axis = "door3axis";
			angle0 = 0;
			angle1 = 0.029;
		};

		class door4 {
			source = "slow_func";
			type = "rotation";
			animPeriod = 2;
			selection = "door4";
			axis = "door4axis";
			angle0 = 0;
			angle1 = 0.029;
		};
	};
};
};

class CfgSounds {
class dooropen {
	name = "dooropen";
	sound[] = {"\policehq\sounds\open.ogg", 40, 1};
	titles[] = {};
};

class doorclose {
	name = "doorclose";
	sound[] = {"\policehq\sounds\doorclose.ogg", 40, 1};
	titles[] = {};
};

class alarm {
	name = "alarm";
	sound[] = {"\policehq\sounds\alarm.ogg", 40, 1};
	titles[] = {};
};

class cellclose {
	name = "cellclose";
	sound[] = {"\policehq\sounds\cellclose.ogg", 40, 1};
	titles[] = {};
};

class cellopen {
	name = "cellopen";
	sound[] = {"\policehq\sounds\cellopen.ogg", 40, 1};
	titles[] = {};
};

class vaultlock {
	name = "vaultlock";
	sound[] = {"\policehq\sounds\vaultlock.ogg", 40, 1};
	titles[] = {};
};

class vaultunlock {
	name = "vaultunlock";
	sound[] = {"\policehq\sounds\vaultunlock.ogg", 40, 1};
	titles[] = {};
};
};

class CfgVehicles {
class Thing;	// External class reference
class Building;	// External class reference
class Strategic;	// External class reference

class NonStrategic : Building {
	class DestructionEffects;	// External class reference
};
class HouseBase;	// External class reference
class Land_VASICore;	// External class reference

class House : HouseBase {};
class Ruins;	// External class reference

class policehq : House {
	scope = public;
	skeletonName = "policehqBones";
	model = "\policehq\policehq.p3d";
	icon = "\policehq\icon\ilpd.pac";
	mapSize = 10;
	displayName = "Island Life Police Dept.";
	vehicleClass = "IL_Buildings";
	nameSound = "Building";
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	animated = false;

	class AnimationSources {
		class slow_func {
			source = "user";
			animPeriod = 2;
			initPhase = 0;
		};

		class fast_func {
			source = "user";
			animPeriod = 1;
			initPhase = 0;
		};
	};
	destrType = "DestructBuilding";

	class DestructionEffects {
		class Smoke1 {
			simulation = "particles";
			type = "BarelDestructionSmoke";
			position = "Handlep_FD_Left";
			intensity = 0.01;
			interval = 1;
			lifeTime = 0.1;
		};

		class Smoke2 {
			simulation = "particles";
			type = "BarelDestructionSmoke";
			position = "Handlep_FD_Right";
			intensity = 0.01;
			interval = 1;
			lifeTime = 0.1;
		};
	};
	cost = 0;
	armor = 10;

	class UserActions {
		class OpencellA {
			displayName = "Open cellA";
			position = "cellAswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""cellA"" < 0.5";
			statement = "this animate [""cellA"",1]; this say ""cellopen""";
		};

		class ClosecellA {
			displayName = "Close cellA";
			position = "cellAswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""cellA"" >= 0.5";
			statement = "this animate [""cellA"",0]; this say ""cellclose""; this setDammage 0";
		};

		class OpencellB {
			displayName = "Open cellB";
			position = "cellBswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""cellB"" < 0.5";
			statement = "this animate [""cellB"",1]; this say ""cellopen""";
		};

		class ClosecellB {
			displayName = "Close cellB";
			position = "cellBswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""cellB"" >= 0.5";
			statement = "this animate [""cellB"",0]; this say ""cellclose""; this setDammage 0";
		};

		class OpentankA {
			displayName = "Open tankA";
			position = "tankAswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""tankA"" < 0.5";
			statement = "this animate [""tankA"",1]; this say ""cellopen""";
		};

		class ClosetankA {
			displayName = "Close tankA";
			position = "tankAswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""tankA"" >= 0.5";
			statement = "this animate [""tankA"",0]; this say ""cellclose""; this setDammage 0";
		};

		class OpentankB {
			displayName = "Open tankB";
			position = "tankBswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""tankB"" < 0.5";
			statement = "this animate [""tankB"",1]; this say ""cellopen""";
		};

		class ClosetankB {
			displayName = "Close tankB";
			position = "tankBswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""tankB"" >= 0.5";
			statement = "this animate [""tankB"",0]; this say ""cellclose""; this setDammage 0";
		};

		class Opencrdoor {
			displayName = "Open Control Room";
			position = "crdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""crdoor"" < 0.5";
			statement = "this animate [""crdoor"",1]; this say ""cellopen""";
		};

		class Closecrdoor {
			displayName = "Close Control Room";
			position = "crdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""crdoor"" >= 0.5";
			statement = "this animate [""crdoor"",0]; this say ""cellclose""; this setDammage 0";
		};

		class OpenbookingG {
			displayName = "Open Booking Gate";
			position = "bookingGswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""bookingG"" < 0.5";
			statement = "this animate [""bookingG"",1]; this say ""dooropen""";
		};

		class ClosebookingG {
			displayName = "Close Booking Gate";
			position = "bookingGswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""bookingG"" >= 0.5";
			statement = "this animate [""bookingG"",0]; this say ""doorclose""; this setDammage 0";
		};

		class OpenintakeD {
			displayName = "Open Intake Door";
			position = "intakeDswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""intakeD"" < 0.5";
			statement = "this animate [""intakeD"",1]; this say ""cellopen""";
		};

		class CloseintakeD {
			displayName = "Close Intake Door";
			position = "intakeDswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""intakeD"" >= 0.5";
			statement = "this animate [""intakeD"",0]; this say ""cellclose""; this setDammage 0";
		};

		class Openjdoor {
			displayName = "Open Jail Door";
			position = "jdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""jdoor"" < 0.5";
			statement = "this animate [""jdoor"",1]; this say ""dooropen""";
		};

		class Closejdoor {
			displayName = "Close Jail Door";
			position = "jdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""jdoor"" >= 0.5";
			statement = "this animate [""jdoor"",0]; this say ""doorclose""; this setDammage 0";
		};

		class OpenpreRdoor {
			displayName = "Open PreRelease";
			position = "preRdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""preRdoor"" < 0.5";
			statement = "this animate [""preRdoor"",1]; this say ""dooropen""";
		};

		class ClosepreRdoor {
			displayName = "Close PreRelease";
			position = "preRdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""preRdoor"" >= 0.5";
			statement = "this animate [""preRdoor"",0]; this say ""doorclose""; this setDammage 0";
		};

		class Openbdoor {
			displayName = "Open";
			position = "bdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""bdoor"" < 0.5";
			statement = "this animate [""bdoor"",1]; this say ""dooropen""";
		};

		class Closebdoor {
			displayName = "Close";
			position = "bdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""bdoor"" >= 0.5";
			statement = "this animate [""bdoor"",0]; this say ""doorclose""; this setDammage 0";
		};

		class OpenyardGdoor {
			displayName = "Open Yard Door";
			position = "yardGdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""yardGdoor"" < 0.5";
			statement = "this animate [""yardGdoor"",1]; this say ""cellopen""";
		};

		class CloseyardGdoor {
			displayName = "Close Yard Door";
			position = "yardGdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""yardGdoor"" >= 0.5";
			statement = "this animate [""yardGdoor"",0]; this say ""cellclose""; this setDammage 0";
		};

		class Openrdoor {
			displayName = "Open Release";
			position = "rdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""rdoor"" < 0.5";
			statement = "this animate [""rdoor"",1]; this say ""dooropen""";
		};

		class Closerdoor {
			displayName = "Close Release";
			position = "rdoorswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""rdoor"" >= 0.5";
			statement = "this animate [""rdoor"",0]; this say ""doorclose""; this setDammage 0";
		};

		class OpenArmory {
			displayName = "Open Armory Door";
			position = "armoryDswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""armoryD"" < 0.5";
			statement = "if (side player == west) then {this animate [""armoryD"",1]};";
		};

		class CloseArmory {
			displayName = "Close Armory Door";
			position = "armoryDswitch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""armoryD"" > 0.5";
			statement = "if (side player == west) then {this animate [""armoryD"",0]};";
		};

		class Opendoor1 {
			displayName = "Open Door";
			position = "door1switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door1"" < 0.5";
			statement = "this animate [""door1"",1]; this say ""dooropen""";
		};

		class Closedoor1 {
			displayName = "Close door";
			position = "door1switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door1"" >= 0.5";
			statement = "this animate [""door1"",0]; this say ""doorclose""; this setDammage 0";
		};

		class Opendoor2 {
			displayName = "Open Door";
			position = "door2switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door2"" < 0.5";
			statement = "this animate [""door2"",1]; this say ""dooropen""";
		};

		class Closedoor2 {
			displayName = "Close Door";
			position = "door2switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door2"" >= 0.5";
			statement = "this animate [""door2"",0]; this say ""doorclose""; this setDammage 0";
		};

		class Opendoor3 {
			displayName = "Open Door";
			position = "door3switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door3"" < 0.5";
			statement = "this animate [""door3"",1]; this say ""dooropen""";
		};

		class Closedoor3 {
			displayName = "Close Door";
			position = "door3switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door3"" >= 0.5";
			statement = "this animate [""door3"",0]; this say ""doorclose""; this setDammage 0";
		};

		class Opendoor4 {
			displayName = "Open Door";
			position = "door4switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door4"" < 0.5";
			statement = "this animate [""door4"",1]; this say ""dooropen""";
		};

		class Closedoor4 {
			displayName = "Close Door";
			position = "door4switch";
			radius = 2;
			onlyforplayer = 0;
			condition = "this animationPhase ""door4"" >= 0.5";
			statement = "this animate [""door4"",0]; this say ""doorclose""; this setDammage 0";
		};
	};
};
};

Thanks in advance.. cheers

Edited by RichardsD

Share this post


Link to post
Share on other sites

You need a separate MODEL.CFG file.

This also helps see the animation in action in Bulldozer (use middle mouse and roller)

config.cpp


#define private        0
#define protected        1
#define public        2
#define true    1
#define false    0

class CfgPatches
{
   class dar_testing
{
       units[] = {"dar_testing"};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"CAData"};
   };
};

class CfgVehicleClasses
{
   class dar_testing
{
       displayName = "TESTING";
   };
};

class CfgVehicles 
{
   class House;    // External class reference
   class dar_testing : House 
{
       scope = public;
       model = "\dar_animtesting\TUT_Door_3x3m.p3d";
       mapSize = 10;
       displayName = "TESTING";
       vehicleClass = "dar_testing";
       nameSound = "Building";
       accuracy = 0.2;
       cost = 0;
       armor = 1000000000;

      class AnimationSources
   {
           class slow_func
		{
               source = "user";
               animPeriod = 2;
               initPhase = 0;
           };
       };

       class UserActions
	{
           class Opendoor1
		{
               displayName = "Open Door";
               position = "pos_switch";
               radius = 2;
               onlyforplayer = 0;
               condition = "this animationPhase ""TheDoor1"" < 0.5";
               statement = "this animate [""TheDoor1"",1]; this say ""dooropen""";
           };
           class Closedoor1
		{
               displayName = "Close Door";
               position = "pos_switch";
               radius = 2;
               onlyforplayer = 0;
               condition = "this animationPhase ""TheDoor1"" >= 0.5";
               statement = "this animate [""TheDoor1"",0]; this say ""doorclose""; this setDammage 0";
		};
	};
};
};

MODEL.CFG

class CfgSkeletons
{
   class Default;
   class MyHouseBones : Default
{
       isDiscrete = 1;
       skeletonInherit = "";
       skeletonBones[] =
	{
		"door", ""
	};
   };
};
class CfgModels
{
   class Default;
   class TUT_Door_3x3m : Default //MUST_BE_THE_NAME_OF_YOUR_P3D_FILE
{
       sectionsInherit = "";
       sections[] = {};
       skeletonName = "MyHouseBones";
       class Animations
	{
           class TheDoor1
		{
               source = "slow_func";
               type = "rotation";
               animPeriod = 2;
               selection = "door";
               axis = "door_axis";
	sourceAddress="clamp";
	minValue=0;
	maxValue=1;
	angle0 = "0";
	angle1 = "rad 90";
           };
};
};
};

Excuse the unusual Indents, came from your file.

Should work, untested of course.

Share this post


Link to post
Share on other sites

Hello, and thank you for your help. I just went into Buldozer, and the animation seems to work correctly. Sadly, when I get ingame, I cannot get any scroll option to operate the door.

The only thing I changed was "TheDoor1" to "door" in the config.cpp and model.cfg file.

Share this post


Link to post
Share on other sites

DONT change TheDoor1 to door, that was definitely incorrect in your previous code

No scroll option? You mean no Action menu ingame?

Try adjusting;

sections[] = {"pos_switch"};

Share this post


Link to post
Share on other sites

Alright, I replaced with your initial config file, I added the line you suggested instead of leaving it as "", but there is still nothing on the action menu. Perhaps it is the placement of my switch point on the mem LOD?

Share this post


Link to post
Share on other sites

Hi, I'm new to modeling in general and have been working on a bunker for a buddy of mine. I'm also having trouble with the door animations in bulldozer (haven't even tried to move it in game yet). I've been checking out others post on the model.cfg file and I can't seem to see what I'm missing and was hoping one of you guys could.

class CfgSkeletons
{
class Default;
class undergroundbunkerBones: Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = 
        {
                "Door","",
		"Door2","",
		"Door3","",
		"Hatch",""
        };
};
};

class CfgModels
{
class Default;
class RYE_bunker_undergroundbunker: Default
{
	sectionsInherit = "";
	sections[] = {Door_Button};
	skeletonName = "undergroundbunkerBones";


        class Animations
        {
                class open_Door
		{
			type = "rotation";
			source = "user";
			animPeriod = 2;
			selection = "Door";
			axis = "Door_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class open_Door2
		{
			type = "rotation";
			source = "user";
			animPeriod = 2;
			selection = "Door2";
			axis = "Door2_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class open_Door3
		{
			type = "rotation";
			source = "user";
			animPeriod = 2;
			selection = "Door3";
			axis = "Door3_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class open_Hatch
		{
			type = "rotation";
			source = "user";
			animPeriod = 2;
			selection = "Hatch";
			axis = "Hatch_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90"; 
		};
	};
};
};

Between following Mondkalb's tutorial and seeing what Gnat responded to on this thread I've been trying to piece it together, so far no go.

Share this post


Link to post
Share on other sites

Then thats why its not working. The cfgmodel class MUST be the model file name

class CfgModels 
{ 
   class Default; 
   class undergroundbunker: Default 

Share this post


Link to post
Share on other sites

Okay, I thought the whole path needed to be there. I'll give it a go later and see what happens. Thanks for the help.

Share this post


Link to post
Share on other sites

Okay, changed the code and got the hatch to work, still no luck with the other three doors though. If you didn't see anything wrong with the rest of the file I guess I screwed something up in the model so I'll start to check back through it from that end. Thanks again.

Share this post


Link to post
Share on other sites

They all seem the same in model.cfg so should work ......

But you used "user" for all the sources, so maybe only one thing will ever work

try "user1", "user2", "user3" etc

Remember you have to eventually define all those sources in the CONFIG.CPP

Share this post


Link to post
Share on other sites

I went back in and finally realized that I forgot to name the doors in one of the LODs, once I fixed that they all worked fine.

I\ll go back in and adjust the users, just added another eight doors so don't need anymore problems on that end.

Thanks again.

Share this post


Link to post
Share on other sites

Hey, do you mind sending me the model files to study? I STILL cannot get mine to work.. lol..

Share this post


Link to post
Share on other sites

I finally got mine to work. Here's my files if you want to take a look.

config

#define TEast 0 
#define TWest 1 
#define TGuerrila 2 
#define TCivilian 3 
#define TSideUnknown 4 
#define TEnemy 5 
#define TFriendly 6 
#define TLogic 7 

#define true 1 
#define false 0 

// type scope 
#define private 0 
#define protected 1 
#define public 2 

class CfgPatches
{
class multilevel
{
	units[] = 
	{
	"Door","","Door2","","Door3","","Door4","","Door5","","Door6",""
	,"Door7","","Door8","","Door9","","Door10","","Door11","","Door12",""
	,"Door13","","Door14","","Door15"
	};
	weapons[] = {};
	requiredVersion = 1;
	requiredAddons[] = {"CAData"};
};
};
class CfgVehicleClasses
{
class multilevel
{
	displayName = "multilevel";
};
};
class CfgVehicles
{
class Strategic;
class Land_multilevel : Strategic
{
	scope = public;
	model = "\RYE_bunker\multilevel.p3d";
	mapsize = 10;
	displayName = "multilevel";
	vehicleClass = "multilevel";
	destrType = "destructBuilding";
	nameSound = "Building";
	ladders[] = {{"start1","end1"}};
	accuracy = 0.2;
	cost = 0;
	armor = 1000;
	icon = "\Ca\buildings\Icons\i_wall_CA.paa";

	class AnimationSources
	{	
		class Door
		{
			source = "user";
			animPeriod = 2;
			initPhase = 0;
		};
		class Door2 : Door {};
		class Door3 : Door {};	
		class Door4 : Door {};
		class Door5 : Door {};
		class Door6 : Door {};
		class Door7 : Door {};
		class Door8 : Door {};
		class Door9 : Door {};
		class Door10 : Door {};
		class Door11 : Door {};
		class Door12 : Door {};
		class Door13 : Door {};
		class Door14 : Door {};
		class Door15 : Door {};
	};

	class UserActions
	{
		class OpenDoors
		{
			displayName = "Open Door";
			position = "Door_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door"" < 0.5";
			statement = "this animate [""Door"", 1]";
		};
		class CloseDoors
		{
			displayName = "Close Door";
			position = "Door_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door"" >= 0.5";
			statement = "this animate [""Door"", 0]";
		};	
		class OpenDoors2
		{
			displayName = "Open Door";
			position = "Door2_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door2"" < 0.5";
			statement = "this animate [""Door2"", 1]";
		};
		class CloseDoors2
		{
			displayName = "Close Door";
			position = "Door2_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door2"" >= 0.5";
			statement = "this animate [""Door2"", 0]";
		};
		class OpenDoors3
		{
			displayName = "Open Door";
			position = "Door3_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door3"" < 0.5";
			statement = "this animate [""Door3"", 1]";
		};
		class CloseDoors3
		{
			displayName = "Close Door";
			position = "Door3_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door3"" >= 0.5";
			statement = "this animate [""Door3"", 0]";					
		};
		class OpenDoors4
		{
			displayName = "Open Door";
			position = "Door4_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door4"" < 0.5";
			statement = "this animate [""Door4"", 1]"; 
		};
		class CloseDoors4 
		{
			displayName = "Close Door";
			position = "Door4_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door4"" >= 0.5";
			statement = "this animate [""Door4"", 0]";
		};
		class OpenDoors5
		{
			displayName = "Open Door";
			position = "Door5_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door5"" < 0.5";
			statement = "this animate [""Door5"", 1]";
		};
		class CloseDoors5
		{
			displayName = "Close Door";
			position = "Door5_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door5"" >= 0.5";
			statement = "this animate [""Door5"", 0]";
		};
		class OpenDoors6
		{
			displayName = "Open Door";
			position = "Door6_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door6"" < 0.5";
			statement = "this animate [""Door6"", 1]";
		};
		class CloseDoors6
		{
			displayName = "Close Door";
			position = "Door6_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door6"" >= 0.5";
			statement = "this animate [""Door6"", 0]";
		};
		class OpenDoors7
		{
			displayName = "Open Door";
			position = "Door7_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door7"" < 0.5";
			statement = "this animate [""Door7"", 1]";
		};
		class CloseDoors7
		{
			displayName = "Close Door";
			position = "Door7_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door7"" >= 0.5";
			statement = "this animate [""Door7"", 0]";
		};
		class OpenDoors8
		{
			displayName = "Open Door";
			position = "Door8_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door8"" < 0.5";
			statement = "this animate [""Door8"", 1]";
		};
		class CloseDoors8
		{
			displayName = "Close Door";
			position = "Door8_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door8"" >= 0.5";
			statement = "this animate [""Door8"", 0]";
		};
		class OpenDoors9
		{
			displayName = "Open Door";
			position = "Door9_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door9"" < 0.5";
			statement = "this animate [""Door9"", 1]";
		};
		class CloseDoors9
		{
			displayName = "Close Door";
			position = "Door9_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door9"" >= 0.5";
			statement = "this animate [""Door9"", 0]";
		};
		class OpenDoors10
		{
			displayName = "Open Door";
			position = "Door10_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door10"" < 0.5";
			statement = "this animate [""Door10"", 1]";
		};
		class CloseDoors10
		{
			displayName = "Close Door";
			position = "Door10_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door10"" >= 0.5";
			statement = "this animate [""Door10"", 0]";
		};
		class OpenDoors11
		{
			displayName = "Open Door";
			position = "Door11_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door11"" < 0.5";
			statement = "this animate [""Door11"", 1]";
		};
		class CloseDoors11
		{
			displayName = "Close Door";
			position = "Door11_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door11"" >= 0.5";
			statement = "this animate [""Door11"", 0]";
		};
		class OpenDoors12
		{
			displayName = "Open Door";
			position = "Door12_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door12"" < 0.5";
			statement = "this animate [""Door12"", 1]";
		};
		class CloseDoors12
		{
			displayName = "Close Door";
			position = "Door12_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door12"" >= 0.5";
			statement = "this animate [""Door12"", 0]";
		};
		class OpenDoors13
		{
			displayName = "Open Door";
			position = "Door13_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door13"" < 0.5";
			statement = "this animate [""Door13"", 1]";
		};
		class CloseDoors13
		{
			displayName = "Close Door";
			position = "Door13_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door13"" >= 0.5";
			statement = "this animate [""Door13"", 0]";
		};
		class OpenDoors14
		{
			displayName = "Open Door";
			position = "Door14_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door14"" < 0.5";
			statement = "this animate [""Door14"", 1]";
		};
		class CloseDoors14
		{
			displayName = "Close Door";
			position = "Door14_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door14"" >= 0.5";
			statement = "this animate [""Door14"", 0]";
		};
		class OpenDoors15
		{
			displayName = "Open Door";
			position = "Door15_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door15"" < 0.5";
			statement = "this animate [""Door15"", 1]";
		};
		class CloseDoors15
		{
			displayName = "Close Door";
			position = "Door15_Button";
			radius = 2;
			onlyforplayer = true;
			condition = "this animationPhase ""Door15"" >= 0.5";
			statement = "this animate [""Door15"", 0]";		
		};
	};
};
};

model

class CfgSkeletons
{
class Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = {};
};	
class multilevel_Bones : Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = 
        {
        "Door","","Door2","","Door3","","Door4","","Door5","",
		"Door6","","Door7","","Door8","","Door9","","Door10","",
		"Door11","","Door12","","Door13","","Door14","","Door15",""
		};
};
};

class rotation;
class CfgModels
{

class Default;
class multilevel : Default
{
	sectionsInherit = "";
	sections[] = {};
	skeletonName = "multilevel_Bones";

        class Animations
        {
        class Door : Rotation
		{
			type = "rotation";
			source = "Door";
			animPeriod = 2;
			selection = "Door";
			axis = "Door_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class Door2 : Rotation
		{
			type = "rotation";
			source = "Door2";
			animPeriod = 2;
			selection = "Door2";
			axis = "Door2_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class Door3 : Rotation
		{
			type = "rotation";
			source = "Door3";
			animPeriod = 2;
			selection = "Door3";
			axis = "Door3_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		class Door4 : Rotation
		{
			type = "rotationZ";
			source = "Door4";
			animPeriod = 2;
			selection = "Door4";
			axis = "Door4_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90"; 
		};
		 class Door5 : Rotation
		{
			type = "rotation";
			source = "Door5";
			animPeriod = 2;
			selection = "Door5";
			axis = "Door5_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
			class Door6 : Rotation
		{
			type = "rotation";
			source = "Door6";
			animPeriod = 2;
			selection = "Door6";
			axis = "Door6_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door7 : Rotation
		{
			type = "rotation";
			source = "Door7";
			animPeriod = 2;
			selection = "Door7";
			axis = "Door7_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door8 : Rotation
		{
			type = "rotation";
			source = "Door8";
			animPeriod = 2;
			selection = "Door8";
			axis = "Door8_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door9 : Rotation
		{
			type = "rotation";
			source = "Door9";
			animPeriod = 2;
			selection = "Door9";
			axis = "Door9_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door10 : Rotation
		{
			type = "rotation";
			source = "Door10";
			animPeriod = 2;
			selection = "Door10";
			axis = "Door10_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door11 : Rotation
		{
			type = "rotation";
			source = "Door11";
			animPeriod = 2;
			selection = "Door11";
			axis = "Door11_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door12 : Rotation
		{
			type = "rotation";
			source = "Door12";
			animPeriod = 2;
			selection = "Door12";
			axis = "Door12_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door13 : Rotation
		{
			type = "rotation";
			source = "Door13";
			animPeriod = 2;
			selection = "Door13";
			axis = "Door13_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door14 : Rotation
		{
			type = "rotation";
			source = "Door14";
			animPeriod = 2;
			selection = "Door14";
			axis = "Door14_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};
		 class Door15 : Rotation
		{
			type = "rotation";
			source = "Door15";
			animPeriod = 2;
			selection = "Door15";
			axis = "Door15_Axis";
			sourceAddress = "clamp";
			memory = 1;
			minValue = 0.0;
			maxValue = 1;
			angle0 = "0";
			angle1 = "rad 90";
		};	
	};
};
};	

I think the main problem I was having was that I hadn't done the named properties section in the Geometry LOD in Oxygen.

Check that if you are still having problems.

Edited by curmudgeon

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×