so the following I get the message pop up but the actor never moves to the player:
so the following I get the message pop up but the actor never moves to the player:
For part 2...
Event OnPlayerLoadGame()
You need to attach it to the Player via MagicEffect or Alias, and it will then fire every time the Game is loaded after that point (so, like the Wiki says, not the first time a game is started/a non-modded save is loaded)
For part 1...
Are you sure you've filled the Property? I've had one or two weird cases of Properties unfilling themselves somehow. I cannot think of any other reason it would not work, off the top of my head.
Thanks, but yes I am sure I filled the property (checked it in the CK numerous times) but I guess I should run a "get id" type check with a debug message. Maybe It is dropping out (I have seen this happen as well but not in a long time) or maybe I am filling incorrectly somehow.
I need an event for the actor script, I already have numerous on player load events for other things. I really would like to avoid yet another one and keep this local to the actor. I looked at some of the vanilla actors with scripts and they use "on cell attached" events, so it looks like the DEV did not know about the on player load bug (where the on cell attach event will not work). Actually as I remember on player load was added a while after release so that may be be the source of some of the new bugs in the game that came after release even for vanilla scripts.
No one knows of any other event that will fire on the actor script that will avoid this issue?
I have been reverse engineering this event related stuff and IIRC not even internal OnLoad is called when the game loads. I think that OnPlayerLoad is your only chance.
Just do OnPlayerLoadGame like mentioned above in conjunction with an event like "OnCellAttach" for when loading the cell normally. This might also be of use:
http://www.creationkit.com/index.php?title=Detect_Player_Cell_Change_(Without_Polling)
That said for your purpose I think OnPackageStart is indeed the better option, assuming it fires when packages are loaded. I'm not too familiar with SKSE functions, I assume that the register for key press is lost when loading a game?
On your script...
If it exists on the actor base itself, I would think that it should be an "actor" script not an object reference. You generally only want object reference scripts attached to actual references placed in the render window. Also, you can just use the "self" function instead of manually pointing to a ref. I doubt that is what is throwing it off, but it might be.
EDIT: Perhaps moveto might not be working is because "me" is referencing the actor script in your property, not the actual objectreference script. Try changing "me" to an ObjectReference property, or better yet cast it as one. I.E. "(me as ObjectReference).MoveTo(PlayerRef)" or (self as ObjectReference).MoveTo(PlayerRef). This tells the script that you are looking for the actual placed reference, not the base object. I know actor script is supposed to be a child to the ObjectReference script and inherent functions from it (which is why it compiles), but I'm pretty sure I've had similar problems before using ObjectReference functions on actors without casting actors as references.
Hey KorJax,
Yeah I already tried all of that several times in different combinations and none of it worked. NO "on event" not even the on start package would fire unless the player was moving from one cell into the cell the actor was in. Bottom line is that if the player loads in a cell with the actor, there is no way for the actor to react to this remotely (out of line of sight) with an "on whatever" event. I found that the old fashioned silent cell wide explosion magic effect worked but finally just put the work on one of my quest scripts using an "on close load menu" event.
This is a hell of a gotcha and one that affects even a few vanilla actor scripts.