Hi.
I'm having a problem with door animation, in the original assets there doesn't seem to be animation for doors, everything can work as a door as long as a part of the model node is called gate, then you can trigger it and the part called gate will open up (just slide up like all doors in LoG)
This makes me believe that motion of doors is hardcoded !! (is that right ?)
You can rotate the animation with tools from Xanathar but that just slides it to the side, or down etc.
I have a working swing door (rotation around origin axis) for my town tilset, but I'm having a hard time implementing it ingame.
It seems I can not call animation file with the door class, (or at least I can't)
Any thoughts on how to go about this are welcome.
Skuggasveinn.
Need help with door animations
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Need help with door animations
My first thought is a bit script heavy, but I can take the effort of it if you prefer!
The solution is very similar to how I implemented my treasure chests:
in my mind that this work from montagneyaya viewtopic.php?f=14&t=4127&p=43298#p43298 maybe has the solution already.
The solution is very similar to how I implemented my treasure chests:
- Have a pit instead of a door (which is inverted in logic in respect of the door - closed when the door is "open" and open when the door is closed)
- Spawn/destroy an invulnerable blockage when the door is closed (pit is open) to avoid the player falling
- Implement an item teleporter and an hidden pressure plate to avoid items falling
- Test test test and iterate with special-case-handling

- Closing the door when a monster is in the tile.. we need to work it out with a teleporter or block the door from closing I think
- The door would be best positioned in the middle of the tile instead at wall-level
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
Re: Need help with door animations
That's a bit complicated to say the least !Xanathar wrote:
- Have a pit instead of a door (which is inverted in logic in respect of the door - closed when the door is "open" and open when the door is closed)
- Spawn/destroy an invulnerable blockage when the door is closed (pit is open) to avoid the player falling
- Implement an item teleporter and an hidden pressure plate to avoid items falling
- Test test test and iterate with special-case-handling
I have an alternate solution or an alternative way to implement the pit solution.
It is based on some simple facts, objects can be place with an offset from the tile the object definition is placed, and objects like pits can be moved in walls if placed on a regular tile in the first place. This does not seems to crash the dungeon editor but I'm not sure if the game engine would like it or not.
With this setting, my idea is similar to Xanathar's pit solution and works as follows :
- Make the animated door model with some offset in its coordinates in order to place it a tile way from where it should be placed.
Modify the animation accordingly. - Have a pit instead of a door, for the simplest implementation take the open animation to open the door and the close animation to close the door.
- Place the pit at the door location and then move it in a wall nearby in a direction compatible with the offset you have done in your model.
Depending on the offset in your model and animation orientation, rotate accordingly. - Add the door frame and a door defined with a frame model and a null/blank door model.
The door frame and fake/invisible door should be right next to the pit/door and aligned properly for the magic to work. - Activate the pit and the door at the same time : if the pit is opened then the door is opened, if the pit is closed then the door is closed.
- Test test test and iterate with special-case-handling

This solution is simpler from my point of view, everything should work as long as the door model and animations have a proper offset alignment with the door frame and the wall section nearby.
I don't know if this could work properly with doors, I wanted to to implement this with spikes traps bursting out of walls and other nasty traps ideas...
But I was also wondering if this could work for up/down sliding doors, or more complex sliding effects...
Edit : typo, grammar, etc...
Last edited by LordYig on Tue Nov 20, 2012 10:35 pm, edited 2 times in total.
Re: Need help with door animations
You're right! Brilliant solution!This solution is simpler from my point of view
I wonder if I should change my treasure chests to a similar solution (technically the chest could be far from a wall, in practice we can mandate that it's close to it if it improves usability).. mumble mumble...
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
- montagneyaya
- Posts: 103
- Joined: Tue May 01, 2012 11:08 pm
Re: Need help with door animations
I did not know that, how are we doing ? This is interesting.LordYig wrote:objects can be place with an offset from the tile the object definition is placed
Door on floor placement: http://grimrock.nexusmods.com/mods/120
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Need help with door animations
Thanks so much for the input.
I got my work cutout for me
offsets are something I use alot (thats the prime ingredient for the mirror mirror room), I hadn't thought of using it with this asset but it makes sense to try it.
This is what I love about this forum, its a fertile ground for bouncing ideas back and forth
Skuggasveinn.
I got my work cutout for me
offsets are something I use alot (thats the prime ingredient for the mirror mirror room), I hadn't thought of using it with this asset but it makes sense to try it.
This is what I love about this forum, its a fertile ground for bouncing ideas back and forth
Skuggasveinn.
Re: Need help with door animations
This is to be done in the model itself, either with the Grimrock Model Toolkit or directly in your modeling software before exporting the model.montagneyaya wrote:I did not know that, how are we doing ? This is interesting.
It depends on the model size, the modeling software you are using, the scene unit scale, etc...
Obviously, this is for special objects only, and it may needs a lot of tweaking and testing, this could lead to a long trial an error process...
That's what we all like about this forum i guessSkuggasveinn wrote:This is what I love about this forum, its a fertile ground for bouncing ideas back and forth![]()
Looking forward to see your rotating door !
Re: Need help with door animations
I've been doing this for a little while now & it works fine in-game.
It's usually best to get the animation all set up and then just do the offset last.
The GMT is very good at that (better than Blender) & you need to offset ~12 squares to lose the sound of the pit opening/closing. Nothing wrong with burying a pit in a wall.
Depending on what you're doing, the hardest part is managing the properties you lose from changing say, a wall, into a pit.
You have to employ various blockages to restore the properties that you lose, (actual blockage objects make lousy blockages btw) sometimes this is simple, sometimes not.
It's usually best to get the animation all set up and then just do the offset last.
The GMT is very good at that (better than Blender) & you need to offset ~12 squares to lose the sound of the pit opening/closing. Nothing wrong with burying a pit in a wall.
Depending on what you're doing, the hardest part is managing the properties you lose from changing say, a wall, into a pit.
You have to employ various blockages to restore the properties that you lose, (actual blockage objects make lousy blockages btw) sometimes this is simple, sometimes not.