CreateEffect: Difference between revisions
Jump to navigation
Jump to search
(Added OOP syntax) |
mNo edit summary |
||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">effect createEffect ( string name, float x, float y, float z [, float rX, float rY, float rZ, float drawDistance = 0 ] )</syntaxhighlight> | <syntaxhighlight lang="lua">effect createEffect ( string name, float x, float y, float z [, float rX, float rY, float rZ, float drawDistance = 0 ] )</syntaxhighlight> | ||
{{OOP||Create||}} | {{OOP||[[Effect]].Create||}} | ||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 17:00, 26 November 2014
Creates an effect on specified position.
Syntax
effect createEffect ( string name, float x, float y, float z [, float rX, float rY, float rZ, float drawDistance = 0 ] )
OOP Syntax Help! I don't understand this!
- Method: Effect.Create(...)
Required Arguments
- name: A string contains effect name.
- x: A floating point number representing the X coordinate on the map.
- y: A floating point number representing the Y coordinate on the map.
- z: A floating point number representing the Z coordinate on the map.
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.
- rX: A floating point number representing the rotation about the X axis in degrees.
- rY: A floating point number representing the rotation about the Y axis in degrees.
- rZ: A floating point number representing the rotation about the Z axis in degrees.
Returns
Returns the effect element if creation was successful, false otherwise.
Example
addCommandHandler("effect", function(cmd, name) local x, y, z = getElementPosition(localPlayer) if createEffect(name, x, y, z) then outputChatBox("Effect created!") else outputChatBox("Bad effect name.") end end )
Changelog
Version | Description |
---|
1.4.0-9.06892 | Added drawDistance argument |