bolt 
A lightning bolt drawn between two vectors
Procs | |
Dispose | Handles soft deletion of lightning bolt segments by default after a lightning bolt faded it will be disposed |
---|---|
Draw | Draws a bolt of type with a color between two assigned vectors on z or client screen |
Effect | Applys animation to lightning bolt segment this could be overriden by child types to allow different animations to the lightning bolt by default, a lightning bolt will fade out then be disposed |
GetAllTurfs | Returns a list of turfs between the bolt's starting vector to the bolt's end vector checking all segments It can return null if no turfs are found. |
GetPoint | Returns a vector at a given fraction 0 to 1, 0 being the start of the bolt and 1 being the end |
GetTurfs | Returns a list of turfs between the bolt's starting vector to the bolt's end vector because this only checks first and last vectors it returns a form of line between both vectors and can be inaccurate if bolt segments stray too far It can return null if no turfs are found. |
New | Constructs the bolt, from vector source to vector dest |
Rotate | Rotates last created bolt to a different angle |
createBolt | Returns a list of segments from vector source to vector dest |
Proc Details
Dispose
Handles soft deletion of lightning bolt segments by default after a lightning bolt faded it will be disposed
@param o the object segment to dispose
Draw
Draws a bolt of type with a color between two assigned vectors on z or client screen
- @param z the map z level to draw on, if z is client it will draw on client screen
- @param type basic segment to use when drawing
- @param color color of the bolt
- @param thickness thickness of the bolt
- @param split if set to 1 will create an obj for each segment, if not it will only create one object with segments as overlays
Effect
Applys animation to lightning bolt segment this could be overriden by child types to allow different animations to the lightning bolt by default, a lightning bolt will fade out then be disposed
@param o the object segment, each lightning bolt is made of several segments
GetAllTurfs
Returns a list of turfs between the bolt's starting vector to the bolt's end vector checking all segments It can return null if no turfs are found.
- @param z the map z level to search
- @param accurate controlls the accurecy of this function, lower number means more accurate results however it reduces performance 1 being the minimum @return a list of turfs the bolt passes on
GetPoint
Returns a vector at a given fraction 0 to 1, 0 being the start of the bolt and 1 being the end
@param fraction 0 to 1, 0 being the start of the bolt and 1 being the end @return a vector at fraction point of the bolt
GetTurfs
Returns a list of turfs between the bolt's starting vector to the bolt's end vector because this only checks first and last vectors it returns a form of line between both vectors and can be inaccurate if bolt segments stray too far It can return null if no turfs are found.
- @param z the map z level to search
- @param accurate controlls the accurecy of this function, lower number means more accurate results however it reduces performance 1 being the minimum, it should be noted even at 1 this will not be too accurate, use GetAllTurfs() for a more accurate result @return a partial list of turfs the bolt passes on
New
Constructs the bolt, from vector source to vector dest
- @param source source vector, where the bolt starts
- @param dest destination vector, where the bolt ends
- @param fade assigns fade out rate, default of 50
Rotate
Rotates last created bolt to a different angle
@param angle the new angle of the bolt
createBolt
Returns a list of segments from vector source to vector dest
- @param source source vector, where the bolt starts
- @param dest destination vector, where the bolt ends @return dest a list of line segments forming a lightning bolt