Is there any way to get the light intensity at a particular tile location? That would be really useful for implementing a rogue-like stealth capability and/or a hide-in-shadows skill.
Is there a way to get the light intensity at a given tile location?
Khas ScriptsNot really the way how light and shadows are applied here.
However you can check distance and line of sight of the mobs from which you are trying to hide.
However you can check distance and line of sight of the mobs from which you are trying to hide.
Yeah, that's not quite enough for me. You can still be in an enemy's line of sight, but concealed in shadow. In that case, they shouldn't be able to see you. But in order to implement that, we would need a function that could check the distance and height differences of the player from nearby light sources, the position of the player with respect to shadows being cast (if shadows are enabled), and the radius of each light source. It seems like the script should already have everything needed for such a function, except perhaps for the light radius. But adding an extra param or two to the lights defined in the Khas Ultra Lighting script could allow us to provide that data.
I think this would be a really cool enhancement. It would be fun as a player to wait until nightfall to infiltrate a castle, hug the shadows as you make your way in, and perhaps douse a few torches along the way, thus sneaking past the army of soldiers guarding the place. I've never done anything like that in a RPG Maker game... it would add some tremendous new depths to the gameplay.
I think this would be a really cool enhancement. It would be fun as a player to wait until nightfall to infiltrate a castle, hug the shadows as you make your way in, and perhaps douse a few torches along the way, thus sneaking past the army of soldiers guarding the place. I've never done anything like that in a RPG Maker game... it would add some tremendous new depths to the gameplay.
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-get-the-light-intensity-at-a-given-tile-location.53863/