Jump to content

Getting Parent Reference from Extended Script


Recommended Posts

Hi there,

 

I'm trying to work with and instance of the WeaponRackPlaqueACTIVATORPlayerHouse Activator, which has the script WeaponRackActivateSCRIPT attached that extends ObjectReference.

 

The problem I run into is that the reference the engine gives me is to WeaponRackActivateSCRIPT. When I try to do manipulations such as MoveTo that require the 3D model in WeaponRackPlaqueACTIVATORPlayerHouse, an error is raised: Error: Object reference has no 3D

 

Try as I may, I can't seem to get access to the underlying object instance. I've tried casting to ObjectReference but get the same object WeaponRackActivateSCRIPT. I've tried .GetBaseObject() and correctly get the underlying form, but that does me no good as I really need that specific ObjectInstance. I understand that internally, scripts that extend have the Parent variable available to refer to the base script, but that doesn't seem to be available.

 

Hopiing this is something simple and I'm just bonking from fatigue. Help, help, help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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