Runtime Item Pickup For Item That Can Be Attached To Multiple Potential Slots

spockthegray

New member
Hi,

I followed the Opsive tutorials and noticed that there is an association between a specific item and a single Slot ID.

In my case, I want to be able to create many items where, if a particular slot ID is full, that same item is perfectly OK being attached to a different Slot ID.

For instance, if the character is holding a spear, it could be attached to an Item Slot on the left hand or the right hand, depending on whether one is already holding an item.

I didn't see a tutorial covering this behavior (having an item that could be attached to different slots, depending on availability of the slot).

Is there a tutorial somewhere that shows this, or if not, how can I achieve this in Opsive?

Thanks,
Danrae
 
This feature isn't built into the controller. For this I would take a look at the Item.SpawnItem method and modify it so it can dynamically change the spawn location.
 
Top