Custom NPCs Scripting Tutorial #3 - Sharing Functions

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии • 22

  • @_nixxie_
    @_nixxie_ 9 лет назад

    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!

    • @OsimonB
      @OsimonB  9 лет назад

      Nicole Sijnja I'm really glad that reference wasn't lost.

    • @_nixxie_
      @_nixxie_ 9 лет назад

      Osimon the weather news is not the same without him

  • @jaredwhite8017
    @jaredwhite8017 9 лет назад

    what is the function for moving I thought that it was npc.navigate() but that wont work

  • @toadhill6394
    @toadhill6394 9 лет назад

    Great video - and great scripting!!

  • @feldmanjared
    @feldmanjared 9 лет назад

    Great video buddy!

  • @xXpkMastersXx
    @xXpkMastersXx 9 лет назад

    how would you generate a random number?

    • @alexpro9542
      @alexpro9542 3 года назад

      Using math.random

    • @xXpkMastersXx
      @xXpkMastersXx 3 года назад

      @@alexpro9542 l0l 5 years ago. thanks! :)

  • @rossiman54
    @rossiman54 9 лет назад

    Can you please tell me how to get NPC's to hold different items,please.

    • @trunks572
      @trunks572 9 лет назад +1

      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.

    • @rossiman54
      @rossiman54 9 лет назад +1

      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.

    • @OsimonB
      @OsimonB  9 лет назад +1

      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.

    • @rossiman54
      @rossiman54 9 лет назад

      Osimon Thanks,mate! Thanks for replying guys.

    • @trunks572
      @trunks572 9 лет назад

      rossiman54 Haha, as you can see Osimon is the brains of this operation I'm just the bystander. Haha.

  • @Daot
    @Daot 9 лет назад

    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);

  • @VReinthal95
    @VReinthal95 9 лет назад

    How do I start the job or role of the npc?