Dangit, there SHOULD be a
String Function GetName()
function or something to get the name...every time I try to do a Debug.Notification() on an NPC, I get the name of a script running on the NPC or some other weird thing and not the NPC's name.
Scriptname ScavengerHuntScript extends Quest ObjectReference[] property Items Auto ; Maximum of 100 different item types int[] property Number Auto ; Quantity needed of each item type. int count int Num int property TotalItemTypes = 0 Auto Bool Property HaveAllItems = False AutoEvent OnInit() ; Set up the array lists of items and quantity needed. Items = new ObjectReference[100] Number = new int[100] count = 0 while Count < ItemList.GetSize() Num = 0 While Num >= 0 if Items[Num] && ItemList.GetAt(Count) == Items[Num] ; Found a matching item in the list before getting to the end. Number[Num] = Number[Num] + 1 ; Need one more of this item. Num = -1 elseif Items[Num] ; There's an item, but it doesn't match. Num += 1 else ; End of the list without finding the item. Items[Num] = (ItemList.GetAt(Count) as ObjectReference) Number[Num] = 1 ; New item, and we've found one so far. TotalItemTypes += 1 ; Need to remember this so we can efficiently go through the list later. Num = -1 endif EndWhile EndWhileEndEventEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if ItemList.HasForm(akBaseItem) CheckIfAllDone() EndifEndEventFunction CheckIfAllDone() bool Value = http://forums.bethsoft.com/topic/1360183-why-is-there-no-way-to-get-the-name-of-an-objectreference/True String StillNeedList ="Still Need: " count = 0 ; Which item are we checking while Value && Items[Count] ; while there are more items to check and we haven't hit something we still need If Game.GetPlayer().GetItemCount(Items[Count]) < Number[Count] Value = http://forums.bethsoft.com/topic/1360183-why-is-there-no-way-to-get-the-name-of-an-objectreference/False StillNeedList = StillNeedList + (Number[Count] - Game.GetPlayer().GetItemCount(Items[Count]) as int) +" " + Items[Count] + "," Endif count += 1 endWhile if Value QuestNeedingHunt.SetStage(StageToSetOnCompletion) else Debug.MessageBox(StillNeedList) endifendFunctionFormList Property ItemList Auto Quest Property QuestNeedingHunt Autoint Property StageToSetOnCompletion Auto