Connecting a property to a reference in script?

Post » Tue Aug 20, 2013 10:04 pm

I need to assign a property to a specific reference of an actor to make him/her a persistent reference. I know you can do this with the editor, by going to the properties tab of a script, then selecting edit value. But since I need to assign this property while the game is running, I need to be able to do it all in the script.

If you didn't understand what I'm asking for, let me explain again: You know when you declare a property in a script, and then you can go to the properties tab in the editor, select "edit value" and connect that property to an object in the editor? Like connecting it via the "select reference in render window" to some actor reference you placed in a cell. Well I need to do that, but all within script because the actor reference that I need to connect my property to will not exit until the game starts. (He is created using the placeActorAtMe command when the game starts)

Thanks in advance for any help.

User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Tue Aug 20, 2013 9:43 pm

Hi,

http://www.creationkit.com/PlaceActorAtMe_-_ObjectReference returns a reference to the created actor. Assign this reference to the property you want to get set.

-docblacky

User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Tue Aug 20, 2013 9:28 pm

Thank you for the response. Sorry if this is a noob question but how do I "assign" it to the property? You mean something like this?

objectReference myActorReference property = someLocation.placeActorAtMe(myActorBase) auto

Would this take the reference that placeActorAtMe() returns and connect it to the "myActorReference" property?

User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm


Return to V - Skyrim