Spawn new NPC after death

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

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

  • @reapersunshine2236
    @reapersunshine2236 2 года назад +2

    Full script for 1.12.2, remember to enable scripts (1=amount of NPCs that you will spawn) (yourNPC= The NPC in SERVER SIDE clones that you will spawn):
    function died(event){
    var me = event.npc;
    event.API.getClones().spawn(me.x,me.y,me.z,1,"yourNPC",event.npc.getWorld());
    }

  • @rosegunn9914
    @rosegunn9914 7 лет назад +1

    So I'm a rather new subscriber to your channel, and I'd like to suggest maybe going over the differences between 1.8/1.8.9 and 1.10.2 coding differences. Some of your videos don't apply to all versions of Minecraft, but if we know the differences, maybe we can troubleshoot better ourselves?
    Either way, this channel has been a HUGE help for me, got me re-interested in coding so thanks! XD As someone with very little experience, I'd like to say I really appreciate it, because this is the only channel on RUclips with regularly updated content on scripting.

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

      I should go back and make two play lists at least - organization where are you?
      thanks

    • @rosegunn9914
      @rosegunn9914 7 лет назад

      I don't know what you mean by where, but skill wise all I can really do is understand and follow along with your explanations of the code, but not actually intuitively write it myself. I have minecraft 1.10.2.
      What really throws me off is 1.8 doesn't seem to need "function dialog(event)" but already has it built in I guess? I was specifically looking at your transporter pay video, since you put the two versions of code side by side and I can compare the two.

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

      Yes in 1.8 and before the functions were "built-in" the tabs on the side
      Now everything needs to be in a function like
      function "hook name"(event)
      Look in the description there are links to Noppes web site with the hooks and command (APi)
      Also join the discord scripting channel where there are many simple examples etc.

    • @rosegunn9914
      @rosegunn9914 7 лет назад

      I see, thanks for the resources!!

  • @seY_OW
    @seY_OW 4 года назад

    the new command doesnt seem to be working for me on 1.12.2 I'm using event.API.getClones().spawn(pX,pY,pZ,1,"Aoi ken",event.npc.getWorld()); and it isn't spawning it from my tab 5 and also after I kill Aoi ken how would i get him to spawn a different version

  • @trxshyunknown
    @trxshyunknown 5 лет назад +1

    can we get a new video of this plz

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

    To Jester Jest -- I can see you comment in the notifications but not here? May be your banned from our country? ;(
    yes you could do this in 1.7 - it could be converted fairly easily

  • @ramatherly
    @ramatherly 7 лет назад +1

    I am stuck with a problem while making this...... The thing is that I am trying to spawn someone after the death... I did exactly as in the Video but it doesn't work..... What version is this? I am at 1.7.10, so I'm not sure that will change anything. Also, one more thing! Can you tell me a way to fix this?

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

      This is for 1.10 look a little further down for how to do it in 1.7

    • @ramatherly
      @ramatherly 7 лет назад

      I looked all over and I can't find a 1.7.10 version, if somehow you do find a 1.7.10 version of this please send me a link to a video or some type of source.

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

      world.spawnClone(npc.getBlockX()+1,npc.getBlockY(),npc.getBlockZ(),5,"B2");
      in the DIED tab
      the 5 is the server clone tab where the clone B2 is located.

    • @ramatherly
      @ramatherly 7 лет назад

      I have one more question, what happens if we want to use a different NPC, do we change the "B2" to another name? Also, thanks!

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

      Y e s

  • @준원김-e8w
    @준원김-e8w 4 года назад +1

    wii this work in version 1.12.2?

    • @Daot
      @Daot  4 года назад +1

      in the description, I show an update command for 1.12

  • @kairoward7738
    @kairoward7738 11 месяцев назад

    How do i set how many times it respawn or how many lives ot has ?😢

    • @Daot
      @Daot  11 месяцев назад

      You could set a world variable with setStoreddata.

  • @Atyus-wh4jg
    @Atyus-wh4jg 2 года назад

    doesnt work

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

    You're GOD

  • @Equeon
    @Equeon 7 лет назад

    How would I accomplish this in the 1.7.10 version? Would this go under the "NPC killed" tab?

    • @Daot
      @Daot  7 лет назад +1

      yes

    • @Equeon
      @Equeon 7 лет назад

      Excellent, thank you - I'll get back to you if I have any issues. I'm baffled how your videos only have a hundred views when you are basically the ONLY source of this kind of information for Custom NPCs. I don't know how people make custom maps otherwise.

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

      in 1.7 its going to be
      world.spawnClone()
      [for some reason I can see your messages in the notifications but not here]

    • @Equeon
      @Equeon 7 лет назад

      Thank you. I posted the messages initially but deleted them once I figured out the issues. Appreciate your help though!

  • @Roug3e_Bunny
    @Roug3e_Bunny 6 лет назад

    how would i use the function to teleport the player ?

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

      you could put in event.source.setPosition(x,y,z);
      this would set the position of the entity that killed it to that position
      To be safe if the "source" of the damage that kills it is not an entity (player) then you would need to put it in an if statement
      if (event.source){
      event.source.setPosition(x,y,z);
      }
      the source would be null if its anything but a player or entity

  • @Jayton
    @Jayton 8 лет назад

    Hey -
    Is there a way for a player to collide/interact (preferably interact) with an NPC then take the skin of the NPC? (Essentially a person has a Steve skin, they interact with an NPC with a Herobrine skin then both the player _and_ the NPC have the Herobrine skin) I've been trying for a few weeks (on and off) and can't figure it out... (I'm pretty new to this.. heh..) I have a feeling that you'd need to put the specific skin URL in the script but.. I have no idea really.. xD
    Nice video by the way! Dropped a like for ya :D

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

      not that I know of -- I'll look in to it

  • @badema7353
    @badema7353 Год назад

    Hey are you able to do this on 1.7.10???

    • @Daot
      @Daot  Год назад

      Yes, instead of functions you put the script in the died tab

  • @Anarch_E
    @Anarch_E 7 лет назад

    How to get them in server save.

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

      The cloner tool (wooden ax) has 3 tabs the first - clones - is to save and spawn local clones the last tab - server - is to save and clone from the server directory

    • @Anarch_E
      @Anarch_E 7 лет назад

      Thanks M8

  • @wrmoose6542
    @wrmoose6542 5 лет назад

    wii this work in 1.8.9?

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

      Looks like it should - the vid is in 1.10 but I don't see any conflict

    • @wrmoose6542
      @wrmoose6542 5 лет назад

      ​@@Daot Oh ok.

  • @KTN4429
    @KTN4429 7 лет назад

    Thank you for a wonderful videoHowever!
    it was not available in 1.7.10Would not you tell me the script of 1.7.10 if you want.
    I am Japanese.
    I am not good at English.
    Please forgive...

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

      I might have time later to make a complete script for 1.7 but I think it would just be something like this
      world.spawnClone(npc.getBlockX()+1,npc.getBlockY(),npc.getBlockZ(),5,"B2");
      in the DIED tab
      the 5 is the server clone tab where the clone B2 is located.

    • @KTN4429
      @KTN4429 7 лет назад

      Oh!
      Thank You!!!

    • @KTN4429
      @KTN4429 7 лет назад

      I'm sorry.
      If you want, please tell me how to let npc despong.
      I'm really sorry...