How to get player / npc heading?

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
DreamStage
Posts: 222
Joined: Mon Oct 11, 2010 2:38 am
Location: Portugal

How to get player / npc heading?

Post by DreamStage »

Hello, when i want to add some spawn, i have difficulty to get the heading i want. Is there any admin command to check for my heading number? Like //heading? In game ofc.
Ignorance comes when you dont want to know the truth about facts.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: How to get player / npc heading?

Post by jurchiks »

The NPCs spawned via //spawn should spawn with the same heading as yours. If you're spawning them via a script, check player.getHeading() (it comes from from L2Character, so it's available for all characters).
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
DreamStage
Posts: 222
Joined: Mon Oct 11, 2010 2:38 am
Location: Portugal

Re: How to get player / npc heading?

Post by DreamStage »

no that... i said, i didnt want the heading throw code. For that i already know. I mean, i addspawn(xxxxxxx) at some random location, but with some heading. I need to check with my ADMIN inside SERVER what heading i have at the exact same location looking for some location.
Ignorance comes when you dont want to know the truth about facts.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: How to get player / npc heading?

Post by Zoey76 »

http://svn.l2jdp.com/branches/unstable/ ... Shift.java

DP Changeset 8601

Check there, maybe I implement it for players too (if not done already) :D
Powered by Eclipse 4.30 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: How to get player / npc heading?

Post by jurchiks »

Do you want to spawn an npc like "//spawn npcId x y z heading"?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
DreamStage
Posts: 222
Joined: Mon Oct 11, 2010 2:38 am
Location: Portugal

Re: How to get player / npc heading?

Post by DreamStage »

ye, but now i found it, i didnt had that changeset. Thank you Zoey
Ignorance comes when you dont want to know the truth about facts.
Post Reply