GetCameraTarget: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) mNo edit summary |
Black Dragon (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This example returns the element which was set as the players cameras target, otherwise, returning false. | |||
<syntaxhighlight lang="lua"> | |||
function returnCamTarget( player ) | |||
local target = getCameraTarget( player ) | |||
if ( target ) then --If target is not false | |||
return target --Return target | |||
else | |||
return false --Otherwise, return false. | |||
end | |||
end | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Camera functions}} | {{Camera functions}} | ||
Revision as of 08:01, 14 June 2007
This function returns an element that corresponds to the current target of the specified player's camera (i.e. what it is following).
Syntax
element getCameraTarget ( player thePlayer )
Required Arguments
- thePlayer: The player whose camera you wish to receive the target of.
Returns
Returns an element if the function was successful, false otherwise.
Example
This example returns the element which was set as the players cameras target, otherwise, returning false.
function returnCamTarget( player ) local target = getCameraTarget( player ) if ( target ) then --If target is not false return target --Return target else return false --Otherwise, return false. end end
See Also
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget