![]() |
[MDL ED] Custom door - sounds not working as they should - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [MDL ED] Custom door - sounds not working as they should (/thread-20044.html) |
Custom door - sounds not working as they should - GrimReaper - 01-24-2013 Hello, I just recently started fiddling around with Amnesia's level editor and the model editor. Now I have a few problems with the model editor and a selfmade door entity... I tried searching the net and the forums but didn't get any answers. So I just registered this forum in hope you could solve my problems or at least help me doing so! ![]() Two days ago I just had the idea to build a swingable door from the originally static door entity "castle_gate_arched01" - if possible. So I looked at already exiting door entities from the original Amnesia to see what changes would be necessary. Based on my observations I performed the following changes:
That actually got the door to work - but only with some problems I don't know how to fix. The problems are:
All in all the door now behaves like the "elevator_door" entity and I can't figure out why. I would rather like the door to behave like the mansion door or the metal door entities. Opening the door's .ent-file in Notepad++ shows every set value in its correct place. What has to be changed to get this done? Or are there technical limits to the editor/enginge/whatever preventing this? Like I said, I hope you can help me. GrimReaper RE: Custom door - sounds not working as they should - The chaser - 01-25-2013 Haven't you tried copy-pasting the main settings from the original doors? It's just easier. The door sounds go in the joint. This joint controlls the body, which controlls the mesh. Just go to View<Outline and assign the parent and the child (the joint parent is the small and non-gravitatorial body which you set in the invisible part of the door (the hinges) and the child of the joint is the body which contains the door's mesh. Just some tips. Try deleting the entity and making another one with these settings, just in case. RE: Custom door - sounds not working as they should - GrimReaper - 01-25-2013 Thanks for your answer! Rep. inbound! ![]() (01-25-2013, 10:47 AM)The chaser Wrote: Haven't you tried copy-pasting the main settings from the original doors? It's just easier.I copied each value manually but I compared several entity-files in Notepad++ to make sure I didn't miss any important options. Of course everything was identical but not successful. Quote:The door sounds go in the joint. This joint controlls the body, which controlls the mesh. Just go to View<Outline and assign the parent and the child (the joint parent is the small and non-gravitatorial body which you set in the invisible part of the door (the hinges) and the child of the joint is the body which contains the door's mesh.Yes, I attached child and parent to the joints in exactly this way. Aside from the player gravity collision issue I can grab the doors and open and close them without any problems. So the bodies are attached correctly. Indeed I can assign a sound directly to the joint. But then only the sound being played when reaching the joint's minimal angle (that means the closing sound) work. That way the whole entity works exactly like the elevator_door-entity: While moving the door, the moving sound is being played, upon slamming the door shut the closing sound is being played. Nothing more, nothing less. Quote:Just some tips. Try deleting the entity and making another one with these settings, just in case.I tried that one, too. It only led to the same unwanted result. Now something new: Since yesterday I seem to have located the source of my problems: All of the mentioned behavior is caused by using more than one hinge joint! After writing my initial post I just remembered that I checked everything but the amount of joints. Since all doors behaving like I wished my door would only have one single hinge joint and since the elevator door and my door have two hinge joints I thought there might be a correlation. And yes, after deleting one hinge joint and setting the mass of the now unattached door body to zero (thus making it static) my door worked exactly like it should - aside from now only one side being movable. With only one hinge joint the door snaps close, plays sounds upon opening and closing, is unaffected by the player's gravity and so forth. But just by adding a second hinge joint, the door's behavior changes back to its "faulty" state. ![]() It seems to me as if this behavior is determined by the system and not changeable. So now I think I have to familiarize myself with Blender to divide the two submeshes of the left and right sides of the door into seperate files and to create two single door entities to place them side by side in the level editor. Through scripting I can then make them both work together in union like they should (locking/unlocking etc.). ![]() If anyone has better solutions, please tell me. RE: Custom door - sounds not working as they should - The chaser - 01-25-2013 Wait a sec, two hinges aren't necessary ![]() The only thing about the meshes: You must have: The door mesh (the door itself) The door hinges (THIS IS ONLY ONE MESH) //You can Join several meshes in Object Mode, at the left bar. In the model editor, create three shapes: One that fits the door itself, and one for each hinge, but ATTENTION! With the door shape create a body, attach it, etc-With the hinges, choose the two shapes and make a body: Then relate the body to the hinges mesh. In the joint, the parent is the static body of the hinges, and the child is the door itself. Note that this is what I do when I want to make doors, I guess one of these should work. In extreme case, you can give me your model and I'll fix it for you, I've done it several times ![]() |