Jump to content
georgeashby123

Making my door a bone in 3ds max.

Recommended Posts

Add whatever mass you consider correct for a door. Doesn't matter how much.

Door_01 or door_01 will both work equally well.

For some reason i can still walk though the door, i have followed all of your steps, but the action is now showing up, but when i click the action, nothing happens. No animation is played.

 

https://gyazo.com/456e633aa6d27ff6c4a4258ae8131dfb

Share this post


Link to post
Share on other sites

Add whatever mass you consider correct for a door. Doesn't matter how much.

Door_01 or door_01 will both work equally well.

Share this post


Link to post
Share on other sites

My door is refusing to open ingame even though everything seems to be setup correctly.

Files and Folders: https://gyazo.com/4029183126da6971a5403407c38f6659
Object Builder: https://gyazo.com/a776a84b136431c085af6643e5c6fd69
config.cpp: https://gyazo.com/8e4ea21ca7272abfe9c2d6600af87372
model.cfg: https://gyazo.com/c42ae69115e0f12730c0093f912e0c0d

 

Does anyone have any idea?

Share this post


Link to post
Share on other sites

The name of the class in model.cfg CfgModels{} must match the name of your .p3d.

 

You have Testdor.p3d and class Testdoor {}. They do not match.

Share this post


Link to post
Share on other sites

The name of the class in model.cfg CfgModels{} must match the name of your .p3d.

 

You have Testdor.p3d and class Testdoor {}. They do not match.

Alright apollo, i really appreciate allt he help

Share this post


Link to post
Share on other sites

Alright apollo, i really appreciate allt he help

For some reason the door is still not opening, the option is there though. I dont know why, could you help? If there are any screenshots needed, please let me know, but the screen shots above are still the same ones. But the model.cfg was changed to your instructions.

Share this post


Link to post
Share on other sites

Ah ok, I just realised I suggested you use animateDoor, which I think might only be applicable to vehicles, whereas you are inheriting from a house.

 

Try this config.cpp instead where you're using a "user" AnimationSource, rather than "door", and the animate command rather than animateDoor

class CfgPatches {
	class TestDoor {
		requiredAddons[] = {"A3_Structures_F"};
		requiredVersion = 0.1;
		units[] = {"Door_01"};
		weapons[] = {};
	};
};

class CfgVehicles {
	class House;
	class House_F : House {
		class DestructionEffects;
	};
	
	class Door_01 : House_F {
		scope = 2;
		displayName = "Working Door";
		model = "TestDoor\TestDoor.p3d";
		vehicleClass = "Structures";
		mapSize = 20.27;
		cost = 40000;
		
		class AnimationSources {
			class Door_01 {
				source = "user";
				animPeriod = 1;
				initPhase = 0;
			};
		};
	
		class UserActions {
			class Door_01_Open {
				displayName = "Open Door";
				radius = 3;
				position = "door_01_axis";
				showWindow = 0;
				onlyForPlayer = 1;
				condition = (this animationPhase 'Door_01') < 0.5;
				statement = this animate ['Door_01', 1];
			};
			class Door_01_Close : Door_01_Open {
				displayName = "Close Door";
				condition = (this animationPhase 'Door_01') >= 0.5;
				statement = this animate ['Door_01', 0];
			};
		};
	};
};

Share this post


Link to post
Share on other sites

Referring back to an earlier post in this thread to correct it slightly, the mass of a component needs to be >10kg, otherwise it does not have a collision geometry.

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

×