Started working on some new weather systems and I while I would love the ability to change World WeatherOverlayparticle traits mid-game, I'm more concerned with random spawning across the map. In the case of a thunderstorm, I'm trying to spawn in lightning actors on random cells across the map, but I can't seem to figure out how to use RandomCell() properly. There are no cases of it being used in any scripts currently on the GitHub. Below is my current spawn code attempt, just yields and error of "Object reference not set to an instance of an object."
Code: Select all
Actor.Create("Lightning", true, { Owner = neutral, Location = Map.RandomCell() })
Are these lighting variables adjustable mid-game? I can add on new World traits to a map's script just fine, but trying to modify them through a Lua script doesn't seem possible at this time.