Controls the frequency and location of lightning strikes.
Normal lightning happens if the Overcast scenario setting (see Define Scenario Settings in the VBS3 Editor Manual) is higher than 0.9, at random locations and intervals. When using the command, the Overcast setting is irrelevant, and lightning strikes can occur in any weather. The specified strike position is not where the lighting strikes, but where it originates in the sky. The actual strike position is offset by a certain distance, depending on the specified elevation, and also depending on the position of the player. For the closest strike position, an elevation of 0 should be specified. An elevation of more than 300m causes the strike to become invisible from the ground. Strikes are only visible, if the player looks upwards. While looking downwards, the strike effect becomes invisible.
|Syntax:||setLightning [interval, position, strength]|
setLightning [10, getPos player, true];
|See also:||setRain, setOvercast|