Hi.
I'm stuck on a problem trying to get one of the example scripts on the creation kit wiki to actually work.
The example script is the one used on the page for GetHeadingAngle, namely the one here:
The example script says:
; Have the statue face the player
float zOffset = Statue.GetHeadingAngle(Game.GetPlayer())
Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset)
I made an object reference script that's attached to a dwemer lever activator, and in place of the property "statue" I made my own property called "ALLSEEINGHEAD"
Scriptname AAAHEADANGLESCRIPT extends ObjectReference
ObjectReference Property ALLSEEINGHEAD Auto
Event OnActivate(ObjectReference akActionRef)
float zOffset = ALLSEEINGHEAD.GetHeadingAngle(Game.GetPlayer())
ALLSEEINGHEAD.SetAngle(ALLSEEINGHEAD.GetAngleX(), ALLSEEINGHEAD.GetAngleY(), ALLSEEINGHEAD.GetAngleZ() + zOffset)
EndEvent
This script compiled, and I made sure to fill in the properties list. There is a dwemer centurion bust in the room where I have multiple levers which all have this script attached to them; it is called "000THEALLSEEINGHEAD", and I made sure that each lever had its script's "ALLSEEINGHEAD" property filled to that reference.
But even though I did this, and the script compiled correctly, the head would not rotate whenever any of the levers were thrown.
I then rewrote the script in a broken-down format to try to figure out what was going on.
Scriptname AAAHEADANGLESCRIPT extends ObjectReference
ObjectReference Property ALLSEEINGHEAD Auto
Event OnActivate(ObjectReference akActionRef)
float zOffset = ALLSEEINGHEAD.GetHeadingAngle(Game.GetPlayer())
float headX = ALLSEEINGHEAD.GetAngleX()
float headY = ALLSEEINGHEAD.GetAngleY()
float headZ = ALLSEEINGHEAD.GetAngleZ()
float headZfinal = (headZ + zOffset)
ALLSEEINGHEAD.SetAngle(headX, headY, headZfinal)
EndEvent
Once again, the script compiled, I filled out the property, but again, when in game, the head did not move when the levers were thrown.
Can someone please assist me with this? I'd rather like to figure out how to get this script to work.