hwoodiwiss Posted January 8, 2012 Share Posted January 8, 2012 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 Link to comment Share on other sites More sharing options...
Jeoshua Posted January 8, 2012 Share Posted January 8, 2012 IsInList Link to comment Share on other sites More sharing options...
hwoodiwiss Posted January 8, 2012 Author Share Posted January 8, 2012 (edited) I think that only works for specific items in a list, I need it so it can be any item in the list. Edited January 8, 2012 by secronz Link to comment Share on other sites More sharing options...
Jeoshua Posted January 8, 2012 Share Posted January 8, 2012 (edited) 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 January 8, 2012 by Jeoshua Link to comment Share on other sites More sharing options...
viennacalling Posted January 8, 2012 Share Posted January 8, 2012 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 More sharing options...
Jeoshua Posted January 8, 2012 Share Posted January 8, 2012 Wow... even easier than I thought. <Jeoshua takes notes> :thumbsup: Link to comment Share on other sites More sharing options...
hwoodiwiss Posted January 9, 2012 Author Share Posted January 9, 2012 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 More sharing options...
Recommended Posts