Jump to content

[LE] Help! reference to placed object by script


Recommended Posts

I don't know if i understand your question correctly, but if i do, then this little script can give you an idea, is quite simple.

 

* EDITED

 

I removed the script because i now understand your question.
You mean, how can you get the "Ref" of the object that was created by the script's "placeAtMe" function.
I haven't done it but to script this you should take on account what was created - placed by the "PlaceAtMe", is it an Object or an Actor ?. Then the "GetRef()" should be pointing to that.
Edited by maxarturo
Link to comment
Share on other sites

Add this in your script's variables:

 

Form Property MyPlacedObjectBaseForm Auto

 

ObjectReference MyPlacedRef

 

 

Then in your script, you can use this variable to identify your placed ref, like:

 

 

Event SomeEvent()

 

MyPlacedRef = Game.GetPlayer().PlaceAtMe(MyPlacedObjectBaseForm)

 

MyPlacedRef.CallSomeOtherFunction()

 

EndEvent

 

You should then be able to use your "MyPlacedRef" variable as you want in you script.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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