-
1 Attachment(s)
Targeted AoE...
Well uh, a quick search didn't yield much results so I figured no one must've utilized this method yet...
Basically, since we can't move the cursor, why not move the camera instead? We know where the cursor is through the API, so all that's left is to adjust the camera so that it points at something.
But how do we know where to point? Well, there's plenty of methods I suppose, some of which might require a higher understanding of mathematics, which I sadly do not possess. So I chose the simple method of comparing cursor coordinates with nameplate coordinates, and through some primitive algorithms, got it to barely work in optimal circumstances. Of course there are some interesting side effects when everything doesn't go as planned, but anyways...
Here's a little sample of what I was able to produce :P
http://www.youtube.com/watch?v=Qk4m1LxnXQ0
Currently it can only target through names (which are also case sensitive), but it could be possible to target raid target icons or the current selected target. I might introduce those features later if my patience with this project doesn't run out before that :P
The usage for the slash command seen in the video is /pnklook target lock
For example, if you want to point at Thrall, you type /pnklook Thrall
but if you want to lock your cursor on Thrall, you type /pnklook Thrall lock
If you need some lua functionalism in the name selecting, you can use the function lookAt( string name, bool lock )
/run lookAt( "Thrall", false ) and /run lookAt( "Thrall", true ) produce the above results.
Also - the parsing for the slash command doesn't handle special characters well so you might use the lua function in that case.
Third edit: the addon also utilizes SetView(2) in an attempt to get a wide view to search for the name plates. So you might want to set a wide view for the B camera (values used in video: 40 pitch 40 distance 0 yaw). If you use SetView(2) for something else, go ahead and edit it to use some other point or take it out altogether :P
Some known bugs (or unfeatures, rather) include earthquakism and cameraman suddenly flying into outer space. And if the camera is blocked by something, say a ceiling, it might yield unwanted results, since it currently relies on camera zoom to adjust the Y difference between cursor and nameplate (I tried to combine zoom and pitch together but that proved quite difficult :P)
Having your cursor in the upper region of the window is pretty much a requirement to get any reliable results as of now. I might improve the algorithms later but thought I'd put this piece of garbage out for you to enjoy for now.
Fourth edit: aaaalso... the nameplate finding function is quite modest, so nameplate addons might break it up.
You'll find the addon attached.
-
sick! and in 119 lines of lua at that. going to try it out now
-
Very nice, looks promising. :)
-
Nice and creative. Good find, good code. Thanks for sharing this with us.
-
Great job - I could see that being extremely useful if it could find raid target icons or something else that would uniquely identify a target on screen. I assume using nameplates would be problematic in a typical scenario where there a number of identically named targets on the screen...
-
Very clever, but .. I don't see any good coming of this to be honest.
It's got "bot" written all over it (if the game were an FPS, this would be called an aimbot). If you show someone that video without providing the code for the Addon, that's probably going to be their first thought. If I were in Blizzard's shoes, I would probably be working on disabling this.
-
Very nice potential here.
Have to point out, you can use Raid Targets on an npc, but cannot mark an opposing player.
The nameplate will be the stronger option for PvP, but Raid Targets will be a nice option for PvE for sure.
If you could lock onto the current target of the active window, rather then a slash command.
Possibly a hotkey to set the lock/target to the currently selected unit.
That would make this a lot stronger/easier to use, in actual play.
I have to agree, Blizzard won't really like something like this.
Thank you for developing this and sharing with the community.
-
I'd simply set this to keep the cursor on my main. Having Blizzard/Rain of Fire cast around my tank is pretty much ideal. If this was to work I could see mages becoming very dominant in boxing...
Flamestrike
Blizzard
PoM-Flamestrike
Blizzard
Loot.
-
It would be helpful if you could describe the code (ie pseudocode).
-
Great call Ghallo. Exactly right. Need consecrate to control aggro anyway. ;)