Jump to content

GetItemCount on Form Lists


hwoodiwiss

Recommended Posts

No, it returns 1 if the item mentioned is in the list, and 0 otherwise. Maybe I don't understand what you really need, but it's exactly what you asked for.

 

if RefID.IsInList FormIdList

<The RefID object is mentioned at least once in the FormID list>

else

<It's not in that list>

endif

 

If you have multiple objects that need testing, you're going to have to switch out the object you're trying to reference a few times.

Edited by Jeoshua
Link to comment
Share on other sites

Is there any way for me to do GetItemCount on a form list and for it to only require one item from the list. Eg. Player.GetItemCount zzExampleList > 0, instead of Player.GetItemCount eg1 || eg2 || eg3 || eg4 || eg5 > 0

 

GetItemCount will already do that for you. The function returns the sum of the counts for all items in the list. No specific object is required from the list.

 

Example: Old World Blues message object NVDLC03HQToasterMSG. The condition for returning appliances is GetItemCount NVDLC03HQBuddiesToasterAllApplianceLIST >= 1, which means if the player has any of the items in the list the option to return appliances will be displayed.

Link to comment
Share on other sites

Is there any way for me to do GetItemCount on a form list and for it to only require one item from the list. Eg. Player.GetItemCount zzExampleList > 0, instead of Player.GetItemCount eg1 || eg2 || eg3 || eg4 || eg5 > 0

 

GetItemCount will already do that for you. The function returns the sum of the counts for all items in the list. No specific object is required from the list.

 

Example: Old World Blues message object NVDLC03HQToasterMSG. The condition for returning appliances is GetItemCount NVDLC03HQBuddiesToasterAllApplianceLIST >= 1, which means if the player has any of the items in the list the option to return appliances will be displayed.

Awesome, thanks everyone!! :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...