ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   LIB 3D arrow (https://www.esoui.com/forums/showthread.php?t=10495)

Shuba00 03/20/23 11:34 AM

LIB 3D arrow
 
Hello i'm trying to create a simple arrow using lib3D arrow, but it isn't working and idk what i'm doing wrong.
This is my code :


function GetPosShuba()
playerX, playerY = LibGPS2:LocalToGlobal(GetMapPlayerPosition("player"))
d("X :" ..playerX .." Y:" ..playerY)

end
function VisShuba()

d("ex2 X :" ..playerX .." Y:" ..playerY)
waypoint = Lib3DArrow:CreateArrow({
depthBuffer = false,
arrowMagnitude = 5,
arrowScale = 1,
arrowHeight = 1,
arrowColour = "FF0000",

distanceDigits = 4,
distanceScale = 25,
distanceColour = "FFFFFF",

markerColour = "FF0000",
markerScale = 1,
})
waypoint:SetTarget(playerX, playerY)
waypoint.arrow:SetHidden(false/ true) --tried both but now working
waypoint.distance:SetHidden(false / true)
waypoint.marker:SetHidden(false / true)
end

SLASH_COMMANDS["/getposshuba"] = GetPosShuba
SLASH_COMMANDS["/visibleshuba"] = VisShuba


Ty for the help in case :)

Link of Lib3DArrow : https://www.esoui.com/downloads/info...ib3DArrow.html

Baertram 03/20/23 12:28 PM

Please use the appropriate forums to ask for lua/XML help.
The Addon help/Support forums are for user questions about addons, not coding questions.

btw isn't the actual LibGPS global variable to use LibGPS3?
Quote:

Migrating from LibGPS2
LibGPS3 offers full backwards compatibility to LibGPS2 (see compatibility.lua), but it's still highly recommended to migrate to the new API.
In order to use the new API, simply access the library via the "LibGPS3" global variable instead of "LibGPS2" or LibStub.
Most functions stayed the same between v2 and v3, but there are a few breaking changes. The following list shows how to migrate those cases.

Shuba00 03/20/23 04:52 PM

Quote:

Originally Posted by Baertram (Post 47443)
Please use the appropriate forums to ask for lua/XML help.
The Addon help/Support forums are for user questions about addons, not coding questions.

btw isn't the actual LibGPS global variable to use LibGPS3?



i found out the code can work outside of the dungeons/arenas.
There is any way to make it work inside dungeons?

Baertram 03/20/23 05:09 PM

No, this is unfortunately prohibited by the game !
Like described here:
https://www.esoui.com/forums/showthread.php?t=9865


All times are GMT -6. The time now is 02:58 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI