WoW:API CameraOrSelectOrMoveStart: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API CameraOrSelectOrMoveStart to API CameraOrSelectOrMoveStart without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This function is called when left clicking in the 3-D world, specifically when a spell is awaiting a target. If you hook this function and grab UnitName("mouseover") or save the target "mouseover" you will be able to know which unit was clicked on.  Once the original function is called, the "mouseover" will not have a value.
{{wowapi}}
{{protectedapi|1.10|}}
Begin "Left click" in the 3D world.


CameraOrSelectOrMoveStart()
== Parameters ==
=== Arguments ===
:()


Also, simulates depressing the left mouse button.  When used alone, puts you into a "mouselook" mode until you press and release the actual left mouse button, or use the CameraOrSelectOrMoveStop command.
=== Returns ===
:''nil''


Example:


/script CameraOrSelectOrMoveStart();
== Details ==
: This function is called when left-clicking in the 3-D world. It is most useful for selecting a target for a pending spell cast.


: Calling this function clears the "mouseover" unit.


Used in conjunction with the CameraOrSelectOrMoveStop command, simulates a left mouse click.
: If you hook this function, be sure to grab <tt>UnitName("mouseover")</tt> or target the "mouseover" unit because once the original function is called, the "mouseover" will not have a value.


Example:
: When used alone, puts you into a "mouselook" mode until [[API CameraOrSelectOrMoveStop|CameraOrSelectOrMoveStop]] is called.


/script CameraOrSelectOrMoveStart();
: IMPORTANT: The normal restrictions regarding hardware event initiations still apply to anything this function might do.
 
__NOTOC__
/script CameraOrSelectOrMoveStop();
 
Result is context sensitive, as the name of the command itself implies; is not a "true" left mouseclick, as it will not activate UI buttons.
 
[[Category:API Functions|CameraOrSelectOrMoveStart]]
[[Category:API Action Functions|CameraOrSelectOrMoveStart]]
[[Category:API Camera Functions|CameraOrSelectOrMoveStart]]
[[Category:API Movement Functions|CameraOrSelectOrMoveStart]]

Latest revision as of 04:45, 15 August 2023

WoW API < CameraOrSelectOrMoveStart

Begin "Left click" in the 3D world.

CameraOrSelectOrMoveStart()

Parameters

Arguments

()

Returns

nil


Details

This function is called when left-clicking in the 3-D world. It is most useful for selecting a target for a pending spell cast.
Calling this function clears the "mouseover" unit.
If you hook this function, be sure to grab UnitName("mouseover") or target the "mouseover" unit because once the original function is called, the "mouseover" will not have a value.
When used alone, puts you into a "mouselook" mode until CameraOrSelectOrMoveStop is called.
IMPORTANT: The normal restrictions regarding hardware event initiations still apply to anything this function might do.