AddLightning
- Parameters
-
codeName string
4 letter id from the LightningData.slk.
checkVisibility boolean
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.
x1 real
x-coordinate (World) of source point.
y1 real
y-coordinate (World) of source point.
x2 real
x-coordinate (World) of target point.
y2 real
y-coordinate (World) of target point.
- comment
-
Creates a lightning between two points.
- note
-
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.
- note
-
For lightning types see: screenshot and test map.
- patch
-
1.17a
- Source
- common.j (suggest an edit or discuss on Github)
- return type
-
lightning
- Source code
-
native AddLightning takes string codeName, boolean checkVisibility, real x1, real y1, real x2, real y2 returns lightning