VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Development Content Development
  • Search

NPC Yaw Rotation

VGOEmulator content development topics.

Moderators: Moldew, Jakkal

Post Reply
Advanced search
6 posts • Page 1 of 1
User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
NPC Yaw Rotation
  • Quote

Post by Xinux » Fri Jan 29, 2016 8:40 pm

Here is the basic Yaw value if you want to set a NPC's heading.

Code: Select all

East  -> 0
south -> 16384
west  -> 32768
North -> 49152

Max value is 65536 which is basically East since it resets to 0
Here is a breakdown to help explain it.

Code: Select all

Unreal Units	Degrees	Radians * π	Steps per circle
1024	        5.625	  1/32	       64 (default step size of the rotation grid)
2730	        15	     1/12	       24 (not quite round, it's actually 2730.6666... )
8192	        45	     1/4	        8
16384	       90	     1/2	        4
24576	       135	    3/4	        2.66...
32768	       180	    1	          2
65536	       360	    2	          1 - full circle
You can also do this do a /loc ingame and take your rotation and multiple it by 91.02

Example
rot.JPG
180 x 91.02 = 16384

16384 will be the yaw value that i enter into the DBE.
You do not have the required permissions to view the files attached to this post.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: NPC Yaw Rotation
  • Quote

Post by Jakkal » Wed Feb 15, 2017 8:31 pm

For my own notes, since I'm a dumbass and won't remember this when I need it later, if you have a negative rotation:
Rot + 180 then multiply it by 91.02.
Image
Top

User avatar
Moldew
Content Designer
Content Designer
Posts: 670
Joined: Sat May 24, 2014 10:51 am
Location: Seattle, WA
Re: NPC Yaw Rotation
  • Quote

Post by Moldew » Sun Oct 08, 2017 8:22 pm

If this is useful for anyone, please feel free to use it - I created a simple function to return an NPC to their original heading after x seconds.

Add these 2 lines into your scripts:

require "Spawns/Generic/spawn_functions"

and

Return_Rotation(Npc, pause)


That will return the NPC to its original rotation (pitch, yaw, roll) that's in the db after however many seconds you set for pause. I'm starting to add that into the hailed() function which also has facetarget() in it, so when you hail the NPC it faces you, then returns to where it started x seconds later.
Haiku is easy -
But sometimes it makes no sense.
Refridgerator.
Top

User avatar
Moldew
Content Designer
Content Designer
Posts: 670
Joined: Sat May 24, 2014 10:51 am
Location: Seattle, WA
Re: NPC Yaw Rotation
  • Quote

Post by Moldew » Sun Oct 08, 2017 9:07 pm

OK, added a better one.

Face_and_Return(Npc, Player, pause)

That will make the NPC face the player and return after x seconds. Put that into your hailed() and your good to go.
Haiku is easy -
But sometimes it makes no sense.
Refridgerator.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: NPC Yaw Rotation
  • Quote

Post by Jakkal » Mon Oct 09, 2017 9:08 am

Oh, nice. Thanks Moldew. But man, that's a lot of NPCs that need to be edited.
Image
Top

User avatar
Moldew
Content Designer
Content Designer
Posts: 670
Joined: Sat May 24, 2014 10:51 am
Location: Seattle, WA
Re: NPC Yaw Rotation
  • Quote

Post by Moldew » Mon Oct 09, 2017 9:36 am

Yeah...

Some of mine don't turn at all, some do. I guess something to keep in mind moving forward. Or maybe a nice project for a new content dev! That way he/she can learn the ropes from looking through various scripts! :)
Haiku is easy -
But sometimes it makes no sense.
Refridgerator.
Top


Post Reply

6 posts • Page 1 of 1

Return to “Content Development”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Development
  • ↳   Content Development
  • ↳   Thestra Adventuring
  • ↳   Qalia Adventuring
  • ↳   Kojan Adventuring
  • ↳   Crafting/Harvesting
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD