Aller au contenu

Photo

SetTileMainLightColor


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Proleric

Proleric
  • Members
  • 2 354 messages
Strange issue with this function - it works fine until I load a saved game, then the area reverts to the original lighting, even if I RecomputeStaticLighting again.

If I run the function again OnEnter from a saved game, it doesn't work, but it does work a few seconds later, so it's not hard-baked.

Can't find any posts on this (apart from a very old one about a hard-bake bug that seems to have been fixed).

Anyone else have this issue?

#2
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

I couldn't get around this with a module I was working on some time ago. It seems to me that when you save a game, the engine uses the lighting parameters for the tiles that are configured in the toolset and ignores any that are scripted in. I'm not sure if this applies to placeables as well. 



#3
Proleric

Proleric
  • Members
  • 2 354 messages
Thanks. I've verified the bug (the new lighting information is simply not in the .sav file) and will update the Lexicon.

The solution is to reapply the new lighting without delay in the OnEnter script. I'd made a silly mistake, using GetArea(OBJECT_SELF) instead of OBJECT_SELF to identify the area.

#4
Proleric

Proleric
  • Members
  • 2 354 messages

Updated the Lexicon and the entry for SetTileSourceLightColor.

The good news is that other area property changes (fog, music and so on) are stored in a saved game, in a section called AreaProperties in the .git file. Also, the placeable illumination state is stored in the Placeables list.
 


  • Squatting Monk aime ceci