Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

PlaceAtMe() has a return value of the object it creates. Store it in a variable like you would any other function's return result.

Edited by foamyesque
Posted

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.

  • Recently Browsing   0 members

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