How to use GetBaseObject() correctly?

Post » Mon Feb 11, 2013 7:50 am

I have a working ObjectReference script attached to an armor item, yet I can't seem to retrieve the reference's base form in an event, i.e:

Scriptname wearable_bag_script extends ObjectReferenceArmor Property thisBag AutoEvent OnEquipped(Actor akActor)	Debug.notification("base:" + GetBaseObject())	... ; various stuff	Game.GetPlayer().UnequipItem(thisBag, False, True)EndEvent

yet it returns None. I've tried self.GetBaseObject() as well, still nothing. I saw this block in a forum search and wondered if perhaps the function only worked in an OnInit event:

Form kBaseObjectEvent OnInit()	kBaseObject = GetBaseObject()EndEvent

but still no luck. I'd like to be able to ditch the property and just unequip the base object directly, what am I doing wrong?
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Return to V - Skyrim