How to equip companion AI with weapons?

cloud cang 3 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 2

How can I equip my companion AI with weapons? My companion AI will follow me to play Boss, but I want to equip my companion AI with weapons, is there any good way? I haven't solved it for a long time.

Unity version:
2019.4 LTS
Game Creator version:

Companion AI cannot have its own inventory window, at this point the inventory module is not flexible.

Satisfaction mark by cloud cang 3 months ago

I purchased the inventory module, but I found that the inventory module can only be used by players, not for companion AI, or...I have not found a method for companion AI, I want to give my weapon to the companion AI, and in The companion AI’s inventory shows that the companion AI is equipped with weapons in the inventory window. I didn’t think of a good way, can anyone give some advice?


Simply use the Equip Item action on your companion with the weapon of your choice. Remember that an Inventory item should have the "Draw Weapon" action set to the "Invoker" as its target. This will make it possible for companions, enemies and players to wield the same weapons.

If you want your companions to carry weapons, you can add a "container" component on them. Note that, although the player must have a certain item in the inventory in order to equip it, this restriction does not apply on enemies and companions (for simplicity).