Jump to content

Scripting to point to NPC


Sticz

Recommended Posts

I am looking for just a line or two of script that points to the wearer of an item so as to change the wearer's faction ratings.

 

I have the script ready for the player, but would like my companions, should I have any, be able to sneak around as well. Here is what I have:

 

Scriptname A0UndeadDisguiseScript

 

Begin OnEquip Player

Player.SetFactionRank UndeadFaction 0

 

End

 

Begin OnUnequip Player

Player.SetFactionRank UndeadFaction -1

 

End

 

 

it is very simple, but I cannot find an example in the vanilla oblivion scripts that fit the template I want to use. I know I am missing something obvious. :rolleyes:

 

Thanks,

 

 

Sticz

Link to comment
Share on other sites

I know how you could do this, but do not know the math involved.

 

There commands Object.GetAngle (X, Y, or Z) and Object.SetAngle (X, Y, or Z) could be used.

 

Get the positions of both players, the angle of the one you want to change, and then figure out the offset you would need to set the new angle. It works like a charm --IF-- you know the math (which I don't, sorry).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...