MontyTRC89 / TombEngine

A new custom Tomb Raider engine based on TR5 engine
62 stars 16 forks source link

[ Feature Request ] Implement getters for Flow.Fog #1367

Open Stranger1992 opened 2 months ago

Stranger1992 commented 2 months ago

Is your feature request related to a problem? Please describe.

Currently, you can only SET the fog colour and distance but not get it.

Describe the solution you'd like

In order to implement changing fog properties so that they are carried over when the game saves and loads: I need the Lua API to be extended to allow for this.

Describe alternatives you've considered

There are mentions of getting the fog properties in the code but its not finished as far as I can tell.

Additional context

n/a

davidmarr commented 2 months ago

you can get the values directly from the object. Try this code:

local level = TEN.Flow.GetCurrentLevel()
print(tostring(level.fog.color))
print(tostring(level.fog.minDistance))
print(tostring(level.fog.maxDistance))