Access Equipped Item's children

maherar

Member
I wanted to access (Active/Deactive) equipped item's children in both 1st and 3rd person mood.
How can I access them and change something?
Do I need to do both separately or at once both will react the same way? Thanks,
 
You can get a reference to the item by calling GetActiveItem on the inventory component. From there you can get the visible item on the PerspectiveItem and disable the objects. The documentation has an example of getting the item.
 
You can get a reference to the item by calling GetActiveItem on the inventory component. From there you can get the visible item on the PerspectiveItem and disable the objects. The documentation has an example of getting the item.
Do you mean here?

It's about finding within one group. I am looking for something independent. For example, I have six items. At runtime, I want to know which item is active, and then I want to activate or deactivate some of its (activated item's) child objects for 1st and 3rd person both.


As you can see, I need to give a groupindex, but in my scenario, I don't have any reference except the active object.

1669841916248.png
 
Here is another problem, Just by copy past, facing this issue as well.

1669842671303.png
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    82.1 KB · Views: 2
You can get a reference to the item by calling GetActiveItem on the inventory component. From there you can get the visible item on the PerspectiveItem and disable the objects. The documentation has an example of getting the item.

The itemSetManager.GetActiveItemSet method needs the groupIndex passed as a parameter, but the documentation does not make clear what that means. Where do we find the correct value for groupIndex to use? Is there a magic number to pass here, or is there another method we need to call to lookup the correct groupIndex value?
 
Top