Download
(5Kb)
Download
Updated: 10-25-16 05:28 AM
Pictures
File Info
Compatibility:
Return to Karazhan (7.1.5)
Updated:10-25-16 05:28 AM
Created:06-07-14 09:21 AM
Downloads:7,076
Favorites:12
MD5:
Categories:Unit Mods, Graphic UI Mods

Crosshairs  Popular! (More than 5000 hits)

Version: 7.1.0.1
by: semlar [More]

Adds an animated crosshair to your target's nameplate for better visibility.

7.1.0.1 - Updated to use the a new function in 7.1 for getting the screen resolution to properly support pixel perfect lines, and fixed an issue with people using viewport addons.
0.3 - Removed leftover cvar script for locking the camera to your target.
Optional Files (0)


Post A Reply Comment Options
Unread 05-31-21, 01:46 PM  
Darkstalix
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Anyone still using this?
Im trying to lower the target lower to the head of the mob or something, anyone any idea?
Report comment to moderator  
Reply With Quote
Unread 08-23-16, 04:32 AM  
Warstryke
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Thanks Semlar, that worked perfectly

I'm running 2560x1440 btw, not sure why it gave me errors.

Thanks for all your work, it's a very handy AddOn.
Last edited by Warstryke : 08-23-16 at 04:34 AM.
Report comment to moderator  
Reply With Quote
Unread 08-22-16, 05:43 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Originally Posted by Warstryke
Getting the following errors with the latest version.

Code:
2x Crosshairs\Crosshairs-0.3.lua:245: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:245: in function `?'
Crosshairs\Crosshairs-0.3.lua:272: in function <Crosshairs\Crosshairs.lua:272>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Code:
37x Crosshairs\Crosshairs-0.3.lua:249: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:249: in function `?'
Crosshairs\Crosshairs-0.3.lua:276: in function <Crosshairs\Crosshairs.lua:276>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
This error appears to be from playing the game at a resolution that it doesn't support. The addon needs to know your resolution to prevent its lines from being anti-aliased and changing their widths (pixel perfect stuff).

You can disable this feature by going to the bottom of Crosshairs.lua and removing or commenting out these 2 lines, and that should stop the errors (alternatively just pick a resolution from the dropdown menu in the interface options).
Lua Code:
  1. f:RegisterEvent('DISPLAY_SIZE_CHANGED')
  2. f:RegisterEvent('PLAYER_LOGIN')
Report comment to moderator  
Reply With Quote
Unread 08-22-16, 05:28 PM  
Warstryke
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Getting the following errors with the latest version.

Code:
2x Crosshairs\Crosshairs-0.3.lua:245: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:245: in function `?'
Crosshairs\Crosshairs-0.3.lua:272: in function <Crosshairs\Crosshairs.lua:272>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Code:
37x Crosshairs\Crosshairs-0.3.lua:249: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:249: in function `?'
Crosshairs\Crosshairs-0.3.lua:276: in function <Crosshairs\Crosshairs.lua:276>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 10:05 PM  
SaltyTemplar
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Fixed

I tried your solution and to no avail, but I browsed your code and commented out your function:

function f:PLAYER_STOPPED_MOVING()
SetCVar('CameraLockedTargetFocusing', 1)
end

starting at line 281 and it fixed the issue. Hope this helps others.

It seems that function kept resetting the focus to 1 even when you manually change it to 0.

Edit: I see now that you were saying you fixed in in your new version. so my change might be useless, regardless it will work for other versions! Thank you for the quick response though it helped me find a fix!
Last edited by SaltyTemplar : 07-19-16 at 10:10 PM.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 09:43 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Issue with Crosshair new 7.0.3 update and Action Camera

Originally Posted by SaltyTemplar
Hello semlar,

I updated your addon today and i noticed that now the addon forces the game to have the new ActionCam feature in legion to have its focus set to on. which cause your camera to pan around the current target. With your addon if you disable it manually with /console ActionCam focusOff it will turn it off BUT if you move at all crosshairs resets it back to the focusOn. I verified this was in fact crosshairs by deleting all other addons then disabling crosshairs and could not recreate the issue. I turned crosshairs back on and the issue came back. Just wanted to let your know, and this focus mode of the Action Cam can make people quite motion sick, I sure know i couldnt raid with it.
I'm sorry, I was playing with something on the beta and must not have removed everything from the script when I uploaded it here. I've uploaded a new version without it.

Anyone who had their camera affected by it can disable the cvar by typing /console CameraLockedTargetFocusing 0
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 09:22 PM  
SaltyTemplar
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Issue with Crosshair new 7.0.3 update and Action Camera

Hello semlar,

I updated your addon today and i noticed that now the addon forces the game to have the new ActionCam feature in legion to have its focus set to on. which cause your camera to pan around the current target. With your addon if you disable it manually with /console ActionCam focusOff it will turn it off BUT if you move at all crosshairs resets it back to the focusOn. I verified this was in fact crosshairs by deleting all other addons then disabling crosshairs and could not recreate the issue. I turned crosshairs back on and the issue came back. Just wanted to let your know, and this focus mode of the Action Cam can make people quite motion sick, I sure know i couldnt raid with it.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 02:57 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Originally Posted by MiRai
[color=#e5e5e5]Semlar, I'm getting this error with Crosshairs now that the pre-patch is live
Should work now.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 01:50 PM  
MiRai
A Warpwood Thunder Caller

Forum posts: 96
File comments: 104
Uploads: 0
Semlar, I'm getting this error with Crosshairs now that the pre-patch is live:

Code:
Message: Interface\AddOns\Crosshairs\Crosshairs.lua:67: attempt to call method 'SetChange' (a nil value)
Time: 07/19/16 15:49:01
Count: 1
Stack: Interface\AddOns\Crosshairs\Crosshairs.lua:67: in main chunk


Locals: r = 0
g = 1
b = 0
alpha = 0.5
_ = "Crosshairs"
addon = <table> {
}
f = <unnamed> {
 GetPlateGUID = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1060
 LNR_UnregisterAllCallbacks = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1182
 GetPlateType = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1052
 GetPlateName = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1029
 LNR_RegisterCallback = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1169
 LNR_UnregisterCallback = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1176
 0 = <userdata>
 EachPlateByName = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1148
 GetPlateRegion = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1100
 GetPlateByGUID = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1068
 GetPlateReaction = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1044
}
circle = <unnamed> {
 0 = <userdata>
}
left = <unnamed> {
 0 = <userdata>
}
right = <unnamed> {
 0 = <userdata>
}
top = <unnamed> {
 0 = <userdata>
}
bottom = <unnamed> {
 0 = <userdata>
}
tx = <unnamed> {
 0 = <userdata>
}
ag = <unnamed> {
 0 = <userdata>
}
rotation = <unnamed> {
 0 = <userdata>
}
group = <unnamed> {
 0 = <userdata>
}
alpha = <unnamed> {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = -1
(*temporary) = "attempt to call method 'SetChange' (a nil value)"

Report comment to moderator  
Reply With Quote
Unread 06-18-16, 01:32 PM  
samvx
A Defias Bandit
 
samvx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 118
Uploads: 3
Originally Posted by semlar
Making it work for your focus target or only friendly or hostile units would require rewriting a significant portion of the addon and I don't have time to design and integrate a configuration panel into it for people to switch between options.
Sound awesome those config options.... maybe this year going to happen?
Report comment to moderator  
Reply With Quote
Unread 10-02-14, 05:32 AM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 75
Uploads: 2
Originally Posted by semlar
...
thanks so much for the reply! too bad there isn't an easier solution :-( would've been so great to keep track of a tank :P
Report comment to moderator  
Reply With Quote
Unread 10-01-14, 03:39 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
You would pretty much need a full nameplate addon to accomplish what you're looking to do, and there's a major drawback to hiding the nameplate elements while keeping them active because you can still click on the nameplates but won't be able to see them.

It's possible (although complicated) to make the nameplates non-interactive, but it's all-or-nothing; you can't make friendly nameplates non-interactive while still being able to click on enemy nameplates.

If you only want to show the vertical lines, open Crosshairs.lua and add "left:Hide()" under the "local left" line and "right:Hide()" under the "local right" line near the top of the file. For horizontal lines do the same thing for top/bottom.

Making it work for your focus target or only friendly or hostile units would require rewriting a significant portion of the addon and I don't have time to design and integrate a configuration panel into it for people to switch between options.
Report comment to moderator  
Reply With Quote
Unread 10-01-14, 07:45 AM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 75
Uploads: 2
Originally Posted by semlar
Originally Posted by b3n9ti
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
No, because it needs the nameplate to figure out where the unit is. You could hide all of the nameplate elements so you couldn't see them, but you'd still have to enable friendly nameplates for the addon to track them.
I apologize in advance for quite a number of questions:

a) any suggestion on how to accomplish that with the blizzard nameplates?

b) should be possible to make it work for 'focus' targets though, when friendly nameplates are enabled, right? ;-)

c) also, is it possible show either the horizontal or vertical line? :P

d) would it be possible to choose if you wanna see it for friendly or/and hostiles? =)
Last edited by b3n9ti : 10-01-14 at 10:57 AM.
Report comment to moderator  
Reply With Quote
Unread 09-30-14, 01:45 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Originally Posted by b3n9ti
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
No, because it needs the nameplate to figure out where the unit is. You could hide all of the nameplate elements so you couldn't see them, but you'd still have to enable friendly nameplates for the addon to track them.
Last edited by semlar : 09-30-14 at 01:46 PM.
Report comment to moderator  
Reply With Quote
Unread 09-30-14, 01:24 PM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 75
Uploads: 2
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
Last edited by b3n9ti : 09-30-14 at 01:26 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: