GetGoldAmount() or getitemcount(gold001) WT?

Post » Wed May 08, 2013 12:28 pm

This new "shorter post titles" for the forum is really bugging me. :shakehead:

anyway....

Which should I use? What is the difference?

GoldLog = Playerref.GetGoldAmount()
Goldlog = playerref.getitemcount(gold001)

User avatar
Charity Hughes
 
Posts: 3408
Joined: Sat Mar 17, 2007 3:22 pm

Post » Wed May 08, 2013 11:09 pm

Nevermind.

User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Wed May 08, 2013 8:27 pm

It's simply redundant. The getItemCount() is merely used to get the number of items in a container (including NPC inventory).

You know

myContainer.getItemCount(whatToCount)

and whatToCount can be just the gold001 item.

User avatar
Lady Shocka
 
Posts: 3452
Joined: Mon Aug 21, 2006 10:59 pm

Post » Wed May 08, 2013 1:06 pm

As previously stated, they are both basically the same thing. I'm pretty sure if you opened up the Actor script you'll find something like:

Function GetGoldAmount()   GetItemCount(gold001)EndFunction
It's good for when you are using it in a fragment (for dialogue for example) where you might find its quicker then making your own MiscItem Gold001 property. Whatever floats your boat really. The latter is probably quicker to execute, all depends on your situation

- Hypno
User avatar
Hella Beast
 
Posts: 3434
Joined: Mon Jul 16, 2007 2:50 am


Return to V - Skyrim