Hey there. I'm the second voice you can hear in the video's. You can right click the NPC with the NPC wand and click on the inventory tab, which there you can add any item for the NPC to hold.
trunks572 Thanks mate.But I was wondering if you could make them do that via scripting.I want my NPC's to pull out their fishing pole when they are fishing,pull out their axe when they are faux chopping wood.
rossiman54 To do that you need to use either setRightItem() or setLeftItem(). But the problem is that it takes a ScriptItemStack as an argument. I can't think of a way to generate them at the moment. I would do some research for you but I've just moved house and currently don't have internet. So once I get internet I'll have a look and see what I can do for you.
Maybe somebody here know this one. why dose: npc.say(npc.rightItem.name); work but you need the 'get' and the () to make this work: npc.say(npc.getProjectileItem().name); While this works fine: npc.rightItem = world.createItem("customnpcs:npcMagicWand",0,1); But this is doing nothing?? ? ? npc.ProjectileItem = world.createItem("minecraft:stone",0,1);
I kind of lost it when you had Jim Hickey as the weather guy!!!! That has to be the only suitable name for a weather NPC!
Nicole Sijnja I'm really glad that reference wasn't lost.
Osimon the weather news is not the same without him
what is the function for moving I thought that it was npc.navigate() but that wont work
Great video - and great scripting!!
Great video buddy!
how would you generate a random number?
Using math.random
@@alexpro9542 l0l 5 years ago. thanks! :)
Can you please tell me how to get NPC's to hold different items,please.
Hey there. I'm the second voice you can hear in the video's. You can right click the NPC with the NPC wand and click on the inventory tab, which there you can add any item for the NPC to hold.
trunks572 Thanks mate.But I was wondering if you could make them do that via scripting.I want my NPC's to pull out their fishing pole when they are fishing,pull out their axe when they are faux chopping wood.
rossiman54 To do that you need to use either setRightItem() or setLeftItem(). But the problem is that it takes a ScriptItemStack as an argument. I can't think of a way to generate them at the moment. I would do some research for you but I've just moved house and currently don't have internet. So once I get internet I'll have a look and see what I can do for you.
Osimon Thanks,mate! Thanks for replying guys.
rossiman54 Haha, as you can see Osimon is the brains of this operation I'm just the bystander. Haha.
Maybe somebody here know this one.
why dose:
npc.say(npc.rightItem.name);
work but you need the 'get' and the () to make this work:
npc.say(npc.getProjectileItem().name);
While this works fine:
npc.rightItem = world.createItem("customnpcs:npcMagicWand",0,1);
But this is doing nothing?? ? ?
npc.ProjectileItem = world.createItem("minecraft:stone",0,1);
How do I start the job or role of the npc?