Thanks for the forceDayPhase() function, it gave me an idea to create a nightvision ability and it's working really well. However, it would be nice to explicitly set the fade speed in forceDayPhase() since my dayphase effect transition time is set to 960 frames which is far too long for turning night vision off. This isn't absolutely needed but would be nice to have a smooth transition between darkness and nightvision.
On another topic I am using isPlayerInLightRadius() as the basis of a thieving system. At the moment it is triggered before the player is lit. I would like to have it be more lenient so that it only returns true if the player is fully lit. Is there a way for me to do that? See example below:
View attachment 182754
On another topic I am using isPlayerInLightRadius() as the basis of a thieving system. At the moment it is triggered before the player is lit. I would like to have it be more lenient so that it only returns true if the player is fully lit. Is there a way for me to do that? See example below:
View attachment 182754
$gamePlayer._lightData should return null or undefined if player is not lit.
So: ($gamePlayer._lightData && event.isPlayerInLightRadius()) returns true only when player has light and is in radius.