hawkthorne / hawkthorne-journey

Digital Estate Planning: The Game
projecthawkthorne.com
1.08k stars 452 forks source link

Play the show door animation when entering level #2504

Closed CalebJohn closed 9 years ago

CalebJohn commented 9 years ago

This fixes a bug where no image for hidden doors was showing when re-entering a level. Additionally I think it's nicer to alert the player that the door is hideable.

To test this open the fireplace in the house and then leave the level and come back.

This also slows down up the greendale door becuase it now plays the sound every time which was weird without an animation.

8bitgentleman commented 9 years ago

Why should the door re-open whenever the player enters the level again? Shouldn't the door just stay open?

CalebJohn commented 9 years ago

I figured it might be useful to let the player know that the hidden door stays open, that way if they forget they won't spend anytime trying to reopen a door. I can change that behavior if we think it would be to annoying.

8bitgentleman commented 9 years ago

Personally I find it annoying, once a door is open it typically stays open. I'm open to other opinions though.

CalebJohn commented 9 years ago

@8bitgentleman Good point I removed the sound and animation when you re-enter a level, I also slowed down the fireplace reveal because it seemed to fast.

8bitgentleman commented 9 years ago

This looks solid to me. Maybe have @niamu take a look before it's merged?

niamu commented 9 years ago

Too lazy to make this a pull request, but it fixes my minor annoyance with the painting going askew again just after you opened the hidden door.

diff --git a/src/nodes/hiddendoortrigger.lua b/src/nodes/hiddendoortrigger.lua
index 774f14c..2a07e53 100644
--- a/src/nodes/hiddendoortrigger.lua
+++ b/src/nodes/hiddendoortrigger.lua
@@ -78,6 +78,7 @@ function HiddenDoorTrigger:keypressed( button, player )
         if result == 'Yes' then
           Gamestate.currentState().doors[self.target].node:show()
           app.gamesaves:active():set(self.key, true)
+          self.open = true
         end
         player.freeze = false
         self.fixed = result == 'Yes'
CalebJohn commented 9 years ago

@niamu nice change, I added it here.