View Full Version : Addon development question
mackenziemi
03-27-2008, 09:48 PM
Hey all
I am wondering if there is a way in .lua to get what direction your character is facing. I am looking at writting an add on that will tell me like when one of my toons is backwards and hence has no line of site. Any ideas?
Thanks
Crucial
03-28-2008, 03:17 PM
Check the functions at: http://www.wowwiki.com/World_of_Warcraft_API
Good luck.
Anozireth
03-28-2008, 05:31 PM
I don't see one for getting the angle directly, but if the character is moving you could use GetPlayerMapPosition ('http://www.wowwiki.com/API_GetPlayerMapPosition')() at two points in time and compute the angle from that. It sounds like you want to be able to tell when you're standing and nuking, so that may not work for what you need. :(
The IT Monkey
03-28-2008, 06:18 PM
I know nothing about building addons... with that said:
Sounds to me like "getting the characters direction" is a bit complex for what you are wanting. Why not just figure some way to pass the "No Line of Site" or "facing the wrong direction" message that pops up on the screen to your main toon? This would probably be a shorter route to what you want.
mackenziemi
03-30-2008, 01:51 PM
What I am trying to get to is something like TomTom where I would have an arrow over their heads telling me which way I need to point them to have them facing the party leader. This way if it was like 180 degrees I could like turn it red so it would grab my attention. Thanks for all the useful posts :D
Dorffo
04-01-2008, 03:23 PM
QuestHelper displays a directional arrow.. you might dig into the code there and see if you can re-tool it a bit for your purposes. Offhand, it seems like that with some of the mini-map ping code in the forums here could maybe get you pointed in the right direction (so to speak...)
edit::
just checked out questhelper over on Curse and noticed this:
How do get that 3D arrow pointing where to go?
That arrow is part of Cartographer Waypoints. It should appear automatically as long as Cartographer is installed and running, and you haven't turned off that feature.
So, check out Waypoints too!
Clanked
04-01-2008, 04:53 PM
Yes, I would suggest Cartographer Waypoints.
They have figured out how to determine which way you are facing.
mackenziemi
04-01-2008, 05:48 PM
Thanks guys :D
shockbeta
04-03-2008, 01:37 PM
Not sure if you found this or not, but this was on the wiki at the bottom of the api page. It's a user defined function.
http://www.wowwiki.com/GetPlayerBearing
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.