WoW:API SetTracking: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
(Command altered with 4.0. Updated accordingly.)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
<div id="fourzeroplus">
== Version 4.0 or higher ==
<i>This command has been altered with the introduction of having more than one tracking skill active at a time. See [[#fourzeroless|Pre-4.0]] for the old version.</i>
Enables or disables a specified tracking.
SetTracking(id,boolean)
----
;''Arguments''
;:id : The id of the track you would like to change to. The id is assigned by the client, 1 is the first tracking method available on the tracking list, 2 is the next and so on.
;:boolean : Can be true or false - true to enable a tracking, false to disable it.
----
;''Returns''
: nothing
----
;''Example''
Enables the first tracking method on the list:
SetTracking(1,true);
Disables the first tracking method on the list:
SetTracking(1,false);
SetTracking(1);
</div>
<div id="fourzeroless">
== Pre-4.0 ==
<i>This command has been altered with the introduction of having more than one tracking skill active at a time. See [[#fourzeroplus|Version 4.0 or higher]] for the newer version.</i>


Changes tracking method to the specified id.
Changes tracking method to the specified id.
Line 23: Line 57:
Changes the tracking method to "None" ('nil' is not required):
Changes the tracking method to "None" ('nil' is not required):
  SetTracking(nil);
  SetTracking(nil);
</div>

Revision as of 04:57, 11 November 2010

WoW API < SetTracking

Version 4.0 or higher

This command has been altered with the introduction of having more than one tracking skill active at a time. See Pre-4.0 for the old version.

Enables or disables a specified tracking.

SetTracking(id,boolean)

Arguments
id
The id of the track you would like to change to. The id is assigned by the client, 1 is the first tracking method available on the tracking list, 2 is the next and so on.
boolean : Can be true or false - true to enable a tracking, false to disable it.

Returns
nothing

Example

Enables the first tracking method on the list:

SetTracking(1,true);

Disables the first tracking method on the list:

SetTracking(1,false);
SetTracking(1);

Pre-4.0

This command has been altered with the introduction of having more than one tracking skill active at a time. See Version 4.0 or higher for the newer version.


Changes tracking method to the specified id.

SetTracking(id);

Arguments
id
The id of the track you would like to change to. The id is assigned by the client, 1 is the first tracking method available on the tracking list, 2 is the next and so on. The option "None" does not have a id assigned but can be accessed using nil.

Returns
nothing

Example

Changes to the first tracking method on the list:

SetTracking(1);

Changes the tracking method to "None" ('nil' is not required):

SetTracking(nil);