WoW:API TurnOrActionStart: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API TurnOrActionStart to WoW:API TurnOrActionStart without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is triggered by pressing down on the right mousebutton.  If keystate down is true of that button then this fires.  Anything contained within this function will then also fire.
{{wowapi}}
{{protectedapi|1.10|}}
Begin "Right click" in the 3D game world.


Additions can be made to this functions via temporary override, as follows ...
TurnOrActionStart()
== Parameters ==
=== Arguments ===
:()


function AddOn_OnLoad()
=== Returns ===
Override_TurnOrActionStart=TurnOrActionStart
:''nil''
TurnOrActionStart=Override
end


function Override()
[Do stuff.]
Override_TurnOrActionStart(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
end


So we could add the notice; "Right mouse button is down!" into the function.
== Details ==
: This function is called when right clicking in the 3D world.


function Override()
: Calling this function clears the "mouseover" unit.
DEFAULT_CHAT_FRAME:AddMessage("Right mouse button is down!")
 
Override_TurnOrActionStart(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
: 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.
end
 
: When used alone, puts you into a "mouseturn" mode until [[API TurnOrActionStop|TurnOrActionStop]] is called.
 
: IMPORTANT: The normal restrictions regarding hardware event initiations still apply to anything this function might do.
__NOTOC__

Latest revision as of 04:47, 15 August 2023

WoW API < TurnOrActionStart

Begin "Right click" in the 3D game world.

TurnOrActionStart()

Parameters

Arguments

()

Returns

nil


Details

This function is called when right clicking in the 3D world.
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 "mouseturn" mode until TurnOrActionStop is called.
IMPORTANT: The normal restrictions regarding hardware event initiations still apply to anything this function might do.