Project Zomboid

Project Zomboid

Fancy Handwork
Agent 0-20 Jan 14, 2023 @ 4:53pm
Little suggestion for the opening/closing animations.
Hey there, just came across your mod and I'm invested in it!

So, straight to the point. I noticed the door opening/closing animation, specially for garage doors, is a little bit weird. I suggest using the window open animation for them.

Also, I think with a few lines of code it is possible to make it so the character detects if a door is infront or behind it, so we could have our survivors kinda pulling the door so they can close the door behind them.
Last edited by Agent 0-20; Jan 14, 2023 @ 4:57pm
< >
Showing 1-4 of 4 comments
dhert  [developer] Jan 14, 2023 @ 6:56pm 
Hello, and thanks for your feedback!

Originally posted by Agent 0-20:
I noticed the door opening/closing animation, specially for garage doors, is a little bit weird. I suggest using the window open animation for them.

For the "Garage Door" animation, unfortunately the "Open/Close Window" animations don't work here as they are too long. My World Action is very quick as to not interfere with normal movement as much as possible.

The main reason for this is the "E" key interactions; these are not exposed in Lua (modding) and therefore I cannot override this. When you press "E", that door is going to open now and there's nothing I can do. Due to this limitation I cannot truly "sync" the animation to the door open/close, but my action is fast enough that it blends nicely.
Using the "Open/Close Window" animation here would require me to lock the player in place longer so the animation plays out, and if there are zombies on the other side of that garage door that would be bad. The door would open immediately, and there would be ~2 seconds where your player could not move.
Alternatively, I could make it so your character could continue to move and only their arms would play the animation, which would look weirder due to the length of the animation. You would also be unable to do any other action for the animation time still unless you manually cancelled it, as in order to play the full animation I have to increase my TimedAction's length.

The current animation is meant to be a compromise of showing your character opening a heavier door, but still being fast enough to not interfere and (hopefully not) kill you.

Originally posted by Agent 0-20:
Also, I think with a few lines of code it is possible to make it so the character detects if a door is infront or behind it, so we could have our survivors kinda pulling the door so they can close the door behind them.

Funny you should mention this, had been working on that. I guess I can give you a sneak peak of that feature.[imgur.com]

I saw you also commented about a showcase video, and yea I'm working on that. It just takes time, and I hadn't gotten to it yet because it takes time away from making this mod better. Ha
Agent 0-20 Jan 15, 2023 @ 7:56am 
I appreciate your answer! Thanks for the enlightment, I completely forgot about the whole being locked in place thing!
LyraLux Mar 20, 2023 @ 6:17pm 
Is it possible to speed up the animations? I was thinking that about the window animation, too, but yeah the animation is too long for a door. As it is right now, I'm ok with it.

I think if you play the game using mostly click > move to and try to open a garage door through the context menu, the animation or "timer" for that one would fit the window animations, because anything done through context menu takes extra time >_>;

I do 2nd this suggestion if you can find a work-around, though! If not, then it's ok! Ty for the mod.
dhert  [developer] Mar 22, 2023 @ 3:25am 
Originally posted by KrispyPixel:
Is it possible to speed up the animations?
Not without looking acceptable, no. The door action is already very fast, and making it any faster causes the animation to lose its blending of poses. This causes the character's arm to look more like a twitch than anything else. The current speed was as fast as I could really make it while still blending the animation in and blending it out.

Originally posted by KrispyPixel:
I think if you play the game using mostly click > move to and try to open a garage door through the context menu, the animation or "timer" for that one would fit the window animations, because anything done through context menu takes extra time >_>;
Doors don't work this way and the TimedActions to open/close doors, even through the Context Menus, are set to take 0 time (immediate). Doors do not animate like Windows do, and their TimedAction is even less complex. It only exists to "chain" the Walk To+Open actions, and performs no real logic other than to toggle the door's state. I cannot tie an animation to it without adding time, and this is inconsistent with how the base game opens doors when pressing the "Interact" button.
< >
Showing 1-4 of 4 comments
Per page: 1530 50