NotKinkyEnough Posted July 30, 2021 Posted July 30, 2021 I can make a conversation line require that the player have >=1 item with a keyword, like you must have any DD collar. But I do not understand how to then pick any one of those items to give to an NPC. Suppose I just want to check if I have anything matching the keyword then give the first one at random or arbitrarily to the NPC in the conversation, can that be done?
Scrab Posted July 30, 2021 Posted July 30, 2021 29 minutes ago, NotKinkyEnough said: Suppose I just want to check if I have anything matching the keyword then give the first one at random or arbitrarily to the NPC in the conversation, can that be done? To give any part of a collection of items to someone, you first need to define this collection Create a Formlist (F4 has those or something of equal value I assume? if not use an Array) and put the DD collars you want to be able to use in there (technically you can put every collar in there if you just want a random one), then in your code you write Armor armor = List.Get(Random 0, Length - 1) as Armor DD.EquipItem( npc, armor ) to get one random Item from that List, and tell DD to equip that very item
NotKinkyEnough Posted July 30, 2021 Author Posted July 30, 2021 2 hours ago, Scrab said: To give any part of a collection of items to someone, you first need to define this collection Create a Formlist (F4 has those or something of equal value I assume? if not use an Array) and put the DD collars you want to be able to use in there (technically you can put every collar in there if you just want a random one), then in your code you write Armor armor = List.Get(Random 0, Length - 1) as Armor DD.EquipItem( npc, armor ) to get one random Item from that List, and tell DD to equip that very item cool cool thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.