Jump to content

Calling remote scripts via GetFormFromFile


Recommended Posts

I am not sure if this is even possible, let me know if a remote script function can be called via GetFormFromFile.

 

This direct object.script function call works fine:

DLC04:DLC04_MonorailScript Property pDLC04_MonorailScript Auto Const Mandatory
pDLC04_MonorailScript.PowerUpMonorail()

This indirect call does not, possibly because the compiler can't resolve the function over a lazy load (" PowerUpMonorail is not a function or does not exist"):

ObjectReference ThisREF = Game.GetFormFromFile(0x00009a3b, "DLCNukaWorld.esm") as ObjectReference ;DLC04_MonorailNukaWorld
ScriptObject RemoteScript = ThisREF.CastAs("DLC04:DLC04_MonorailScript")
RemoteScript.PowerUpMonorail()
Link to comment
Share on other sites

  • Recently Browsing   0 members

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