4 letter id from the LightningData.slk.
If this is true, the lightning won't be created and the function will return null unless the local player currently has as visibility of at least one of the endpoints of the to be created lightning.
x-coordinate (World) of source point.
y-coordinate (World) of source point.
x-coordinate (World) of target point.
y-coordinate (World) of target point.
Creates a lightning between two points.
The source z value of the new lightning is set to match the current terrain height of the source point, analogously, the target z value matches the current terrain height of the target point. Later changes to the terrain height do not affect herewith created existing lightnings anymore.
- return type
- Source code
native AddLightning takes string codeName, boolean checkVisibility, real x1, real y1, real x2, real y2 returns lightning