NPC actionpoints with items

+
NPC actionpoints with items

when you add an npc to the world via action point how do you get them to use an item with it? for example my npc is grabbing an invisible log and carrying it and stacking it onto a pile of invisible logs. how do i make him carry a visible log?
 
You should open NPC entity and go to Inventory tab. Then add item (+). Example below:
View attachment 257
 

Attachments

  • items.jpg
    items.jpg
    14.8 KB · Views: 44
  • items.JPG
    items.JPG
    56.3 KB · Views: 49
i did as you said but with work instead of steel sword and added piece of wood for the inventory but it isnt working. I added CInventoryComponent0 to the the gather wood action point but it didnt do anything. do i have to link them? and if so what link do i use?
 
strangely the stand and throw wood into fire action point works. the npc picks up a log you can actually see, and throws it and it lies on the ground where it landed for a few seconds and disappears. i copied the exact mesh setup using the inventory items and the gather wood is still invisible
 
The gather wood animation does not use any item as far as I know. Adding items works for using a broom (altough I think it also works without adding) or using a sword (for training as an example). You also have need to assign "npc" items to the npcs. They don't use Geralts sword as an example.
 
strangely the stand and throw wood into fire action point works. the npc picks up a log you can actually see, and throws it and it lies on the ground where it landed for a few seconds and disappears. i copied the exact mesh setup using the inventory items and the gather wood is still invisible
Don't know what you mean with "mesh setup", but I used a citizen_craftman_12 with a stand throw wood to fire actionpoint and as you said the log can be seen.

But the craftsman does not have a log in his inventory.

edit: upps. well, while testing this Benze already posted.:rolleyes:
 
Last edited:
i have been trying for hours to figure it out and its still bugging me that i cant get it to work. try it yourself - add the action point gather wood and you will see what i mean. the animation works fine but the npc doesn't actually create a log and just walks holding air in his arms. whereas when you do say the throw wood into fire action point it works without you having to change anything about it. the npc will create a log and throw it on the ground without you adding anything to the inventory of the npc
 
try it yourself - add the action point gather wood and you will see what i mean. the animation works fine but the npc doesn't actually create a log and just walks holding air in his arms.
upps, seems you misunderstood me. I didn't deny this. As Benze said: the gather wood animation seems to be buggy.

whereas when you do say the throw wood into fire action point it works without you having to change anything about it. the npc will create a log and throw it on the ground without you adding anything to the inventory of the npc
This is true, isn't it? The only thing I wanted to point out is that (imho) adding items to npc inventories does not make them appear during animations performed by the npc.

There is a category work_portable for inventory items and there are items like Box_to_carry or Broom but someone has to figure out how to use this.

edit: as far as I can see there are only two npcs who use the category work_portable in their inventory:
it's the binduga_fisherman_basket (Fishing_basket) and the vergen_crowd_dwarf_03 (Pickaxe).

So as a test one could replace the Fishing_basket by Box_to_carry and see what happens.
 
Last edited:
Top Bottom