Quantcast
Download
(4 Kb)
Download
Updated: 06/14/19 11:44 AM
Compatibility:
Elsweyr (5.0.5)
Updated:06/14/19 11:44 AM
Created:06/14/19 11:44 AM
Monthly downloads:870
Total downloads:1,166
Favorites:2
MD5:
5.0.5
Lib2DArrow
Version: 1
by: Scootworks [More]
Requires: LibAsync


A texture created for tracking position between a player and a target unit.
Those possibilities are available to track:
- TARGET_TRACKING_TYPE_NORTH
- TARGET_TRACKING_TYPE_PLAYER
- TARGET_TRACKING_TYPE_WAYPOINT
- TARGET_TRACKING_TYPE_RALLYPOINT
Create a control that inherits from Lib2DArrowTemplate (or custom), and use CreateNew2DArrow() to add the arrow to it.

CreateNew2DArrow(identifier, parent, data) takes a table describing the the new arrow. # marked entries are optional:
lua Code:
  1. identifier      = "unique"                          -- *string* Something that uniquely describes the arrow you want to add.
  2. parent          = control                           -- # *control* Define a parent control (default GuiRoot)
  3. data =
  4.     {
  5.         texture     = "texturePath",                    -- # *string* The patch of your texture. Can be an ingame texture or addon texture.
  6.         type        = TARGET_TRACKING_TYPE_WAYPOINT,    -- # *number* It's important to define a type. (default TARGET_TRACKING_TYPE_NORTH)
  7.         template    = "template",                       -- # *string* Define your own custom template. (default Lib2DArrowTemplate)
  8.         color       = ZO_ERROR_COLOR,                   -- # *table* Use ZO_ColorDef to set a color. (default #ffffff)
  9.         alpha       = 0.5,                              -- # *number* Use a value from 0 to 1. (default #ffffff)
  10.         unitTag     = "group2",                         -- # *string* We want to track this unit. (default nil)
  11.         width       = 256,                              -- # *number* Texture control width (default 128 if using Lib2DArrowTemplate)
  12.         height      = 256,                              -- # *number* Texture control height (default 128 if using Lib2DArrowTemplate)
  13.         animation   = true,                             -- # *bool* Define a simple zoom animation. (default false)
  14.         zoom        = 1.25,                             -- # *number* 1 is the same size as normal. Use a higher or lower value instead. Only if animation is available. (default DEFAULT_ZOOM_FACTOR)
  15.         loops       = 3,                                -- # *number* How many times should the animation be executed, as long the animation is true. (default DEFAULT_LOOP_COUNT)
  16.         duration    = 180,                              -- # *number* Duration in milliseconds for a loop. (default DEFAULT_DURATION)
  17.     }

Example:
lua Code:
  1. local setVisible = true
  2.     local data =
  3.     {
  4.         identifier  = "ScootworksGroupLeader",
  5.         texture     = "ScootworksGroupLeader/texture/arrow1.dds",
  6.         color       = ZO_ERROR_COLOR,
  7.         type        = TARGET_TRACKING_TYPE_PLAYER,
  8.         animation   = true,
  9.         loops       = 4,
  10.         duration    = 600,
  11.     }
  12.     local myArrow = CreateNew2DArrow(GuiRoot, data)
  13.     myArrow:SetUnitTag(GetGroupLeaderUnitTag())
  14.     myArrow:StartTracking(setVisible)
Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: