WoW:API IsMounted: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: Checks to see if the player is mounted or not. == Arguments == None == Returns == 1 if the player is currently flying, nil otherwise == Example Code == mounted = IsMounted() If the...)
 
m (Move page script moved page API IsMounted to WoW:API IsMounted without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 9: Line 9:
== Returns ==
== Returns ==


1 if the player is currently flying, nil otherwise  
''true'' if the player is currently mounted, ''false'' otherwise


== Example Code ==
== Example Code ==
Line 15: Line 15:
  mounted = IsMounted()
  mounted = IsMounted()


If the player is mounted then the value of mounted will be 1. However if the player is not mounted then mounted will have a value of nil. To save space, instead of assiging the return value of IsMounted() to mounted, IsMounted() can be inserted into the code like a number.
If the player is mounted then the value of mounted will be ''true''. However if the player is not mounted then mounted will have a value of ''false''. To save space, instead of assiging the return value of IsMounted() to mounted, IsMounted() can be inserted into the code like a number.
  /script if IsMounted() == nil then...
  /script if not IsMounted() then...
In this case if the player is not mounted then the code after then will be excuted.
In this case if the player is not mounted then the code after then will be excuted.


== Details ==
== Details ==
Unknown which patch IsMounted() was added in.
IsMounted() was added in Patch 2.0.1

Latest revision as of 04:46, 15 August 2023

WoW API < IsMounted

Checks to see if the player is mounted or not.

Arguments

None

Returns

true if the player is currently mounted, false otherwise

Example Code

mounted = IsMounted()

If the player is mounted then the value of mounted will be true. However if the player is not mounted then mounted will have a value of false. To save space, instead of assiging the return value of IsMounted() to mounted, IsMounted() can be inserted into the code like a number.

/script if not IsMounted() then...

In this case if the player is not mounted then the code after then will be excuted.

Details

IsMounted() was added in Patch 2.0.1