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:
- opened the file "castle_gate_arched01.ent" and saved it under another name
- created two new cylindric bodies inside the mesh's faked hinges to use them as pivots
- added two hinge-joints and moved them to their correct places on the pivots
- turned the hinges to make sure both sides open in the correct direction (one hinge is therefore upside down)
- set the type of the entity to SwingDoor
- attached the new bodies of the hinges to the joints (as parents) so that they remain static
- attached the bodies of the door sides to the joints (as children) so that they pivot around the hinge-bodies
- scaled the width and height of the door's bodies down a litte bit so that they won't collide with each other and the floor while opening or closing the door
- took the same body values for mass, dampening, moving speed and collision as in the mansion door entity
- set the joints' angles to min. 0.1 and max. 90 degrees (same as in mansion door)
- set the joints' moving sound to linear and the sound file to "joint_door_move_special.snt"
- opened up the user defined variables and chose "close_door.snt" for CloseOnSound, "open_door.snt" for CloseOffSound and "lock_door.snt" for InteractLockedSound
That actually got the door to work - but only with some problems I don't know how to fix.
The problems are:
- the door can be opened and closed simply by walking right through or against it allthough I set "Collide character" to true and "Pushed by player gravity" to false
- allthough having set them the sounds for opening and closing the door (open_door.snt and close_door.snt) don't play, that means there is no sound when clicking and unclicking the door ingame (but the moving sound works)
- both sides of the door won't snap to the minimal angle like e.g. the mansion door does
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