Closed ksjfhor closed 3 months ago
Thanks for the flag, but this is expected behavior if SanityAttribute is set with Decay in Darkness
to On
.
Either switch it off or remove the SanityAttribute from the Player.
I did not think that this should happen, since the areas are well lit :) The decisive factor here is if the player is in a Lightzone or not.
To elaborate: Decay in Darkness checks if the VisibilityAttribute has changed and starts the decay if the attribute is 0. Since there are no Lightzones in the scene when the player starts, it's not triggered (which is actually something I should rectify). The check does get triggered on scene change, which is why the decay starts when you change the scene. So this is actually behaving as expected.
Got it, would you close it when you added lightzones ? I guess most devs would run into that trap 🤗
Why am I always running into those things, lol.
You're not the first one to run into this, I know the whole Visibilty/Sanity set-up is not very intuitive. I'm inclined to remove the SanityAttribute from the player by default, and maybe add something more intuitive like a "HungerAttribute", but that's a separate issue.
And yeah, I should take some time soon to add proper Lightzones to the new Demo Scenes. 😅
isn't there still a bug in the sense that sanity does not decay on game load/start?
Please dont remove it, I really like that feature. We just need a little bit more light 💡
@brian-holsters: glass shatters I just reloaded a few dozen times, and yes I got sanity damage. But I did not really care, since I was checking for different lights. But know; MRP: I started a fresh save, instantly saved and loaded: my sanity starts to drop.
isn't there still a bug in the sense that sanity does not decay on game load/start?
yes, will try to fix this soon.
Please dont remove it, I really like that feature.
I wouldn't remove it completely, just not include it in the default player.tscn setup. But properly setting up the lightzones in the demo scenes is probably the better way to go. 😇
isn't there still a bug in the sense that sanity does not decay on game load/start?
This should now be fixed in https://github.com/Phazorknight/Cogito/commit/893164ae6ad27f9ba97b0f41a622de24c43d1069
Going to close this issue now.
Cogito and Godot Engine Version: Godot: 4.2.1.stable Cogito: beta 202403.25 (current master)
Description: After Scene transition the player takes sanity damage. Traversing back still gives the player damage.
Reproduction steps: DL the current master. Start a new game. Walk from the lobby to the lab. Take sanity damage. Wonder why ?
After I died, I respawned in the Lab and did not take sanity damage, as I get back to the Lobby, I get sanity damage again, so I guess it comes from the transition.
Expected behavior: I did not think that this should happen, since the areas are well lit :)
Stacktrace:
Godot is set to be verbose, so this stack may have some messages that you do not get.