I found the function getreference(), but this seems to just return the reference for an alias attached to it (e.g. Bob.getreference()).
For example, say I attach the script to an item. When the item is sold I want to give it to another character.
e.g.
Event OnSell(Actor akSeller)
Actor giftee = Game.FindRandomActor(0.0,0.0,0.0,100) {or whatever to get a valid Actor}
giftee.AddItem(akItemReference)
My problem is that I need the object reference to pass to AddItem. So how can I get the reference of the object my script is currently attached to? If I can't figure out how to fetch it in the script, I'd have to change the script by hand for every game item I attach it to.
e.g. ObjectReference myCurrentItem = ???
Is there some default objectreference variable set for whatever your script is attached to?
Thanks for any pointers,
-mrmra