Alias GetReference Question

Post » Tue Jun 19, 2012 1:27 pm

I have a question regarding using the getreference function on an alias. Someone suggested that it doesn't work, but withing my quest stages I have a script that reads:

Alias_TestChest.GetReference().AddItem(Alias_Moth.GetReference())

and it works like a champ. When you hit the appropriate stage, the chest fills with the Moth jar. However, when I attempt it within a dialogue script like so:

Scriptname InsectTurnIN extends ObjectReferenceAlias Property TBJBurke  Auto Alias Property Insect  Auto function giveBug()    TBJBurke.GetReference().AddItem(Insect.GetReference())   endFunction

I get these errors


c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\InsectTurnIN.psc(12,13): GetReference is not a function or does not exist
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\InsectTurnIN.psc(12,43): GetReference is not a function or does not exist
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\InsectTurnIN.psc(12,28): none is not a known user-defined type
No output generated for InsectTurnIN, compilation failed.

telling me I can't use getreference. Can anyone tell me why?
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Tue Jun 19, 2012 10:13 pm

You probably want to use ReferenceAlias not just Alias for your properties.
User avatar
Bird
 
Posts: 3492
Joined: Fri Nov 30, 2007 12:45 am

Post » Tue Jun 19, 2012 12:18 pm

Thank you kindly! I wouldn't have gotten that on my own sadly.
User avatar
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am


Return to V - Skyrim