Changes the times when a prop is illuminated.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
var off = 15.0f; // amount of hours the light is turned off during the day (15 max) (0 means always on) | |
var random = 0.3f; // adds randomness to time lights turn on/off, if 0 then all lights turn on/off at the same time | |
asset.m_illuminationOffRange.x = 6*Convert.ToSingle(Math.Pow(Convert.ToDouble((6-off/2.5)/6), Convert.ToDouble(1/1.09))); | |
asset.m_illuminationOffRange.y = Mathf.Clamp(6*Convert.ToSingle(Math.Pow(Convert.ToDouble((6-off/2.5)/6), Convert.ToDouble(1/1.09)))-random, 0, 6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment