Jump to content

Detecting an [ObjectReference <None>]


pra

Recommended Posts

I have a workshop object which places a Hazard when built, which should exist until the object is deleted. For this, I have a Property on the workshopobject pointing to the placed ObjectReference.

I noticed the Hazard is being deleted rather eaglerly, so I am attempting to re-place it when it's gone. However, noticing that seems to be rather difficult.

Doing debug.trace on the reference after it was deleted gives me "[ObjectReference <None>]". This does not count as none, and as true when cast to bool. When I try do do something like "getFormId" on it, I get:

 

 

 

[10/30/2017 - 11:36:53PM] error: Unable to call GetFormID - no native object bound to the script object, or object is of incorrect type

 

So, how do I figure out if there is a "native object bound" to this "script object"? Or, do I have to do it in a totally different way anyway?

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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