CreateSearchLight: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Corrected "See also" section template)
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0160|1.6|7675|This function creates a [[Element/Searchlight|searchlight]]. A [[Element/Searchlight|searchlight]] a spotlight which looks like the one available in the Police Maverick.}}
{{New feature/item|3.0160|1.6|7675|This function creates a [[Element/Searchlight|searchlight]]. A [[Element/Searchlight|searchlight]] is a spotlight which looks like the one available in the Police Maverick.}}


==Syntax==  
==Syntax==  

Revision as of 17:52, 8 December 2015

This function creates a searchlight. A searchlight is a spotlight which looks like the one available in the Police Maverick.

Syntax

searchlight createSearchLight ( float startX, float startY, float startZ, float endX, float endY, float endZ, float startRadius, float endRadius [, bool renderSpot = true ] )

OOP Syntax Help! I don't understand this!

Method: SearchLight.create(...)


Required Arguments

  • startX: the X coordinate where the searchlight light cone will start.
  • startY: the Y coordinate where the searchlight light cone will start.
  • startZ: the Z coordinate where the searchlight light cone will start.
  • endX: the X coordinate of the direction where the searchlight will point to.
  • endY: the Y coordinate of the direction where the searchlight will point to.
  • endZ: the Z coordinate of the direction where the searchlight will point to.
  • startRadius: the radius of the searchlight's light cone in its beginning.
  • endRadius: the radius of the searchlight's light cone in its end.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • renderSpot: if true, the searchlight will lighten the surface where it ends.

Returns

If every argument is correct, this function returns a searchlight element. Otherwise, it returns false.

Example

-- TODO

See also