One of my biggest problems is reading Noppes API. Like right now I can't understand how to work with any of the scoreboard methods. How do I figure it out.
Hey Osimon I wanna know do you know how Aphmau makes her custom npc's do what they do. Like how they talk in color and then it switches to a diffrent one after? She also makes their heads and makes them move but I doubt it's the wand because their movement is so strange they jump and do all these thing can you help?
Could you use this to get the metadata for wheat etc to create a farmer who checks for the wheat to be fully grown and then faux farms it and replants it?
Nicole Sijnja Yes you could, good idea! If I remember correctly, the metadata value for fully grown crops is 7. You should give it a try and see what happens.
Osimon I have been trying to work out a way to do this, so that we have a very alive feeling to our villages we are building. I will certainly give this a try!
Arothin Lasgalen Because of the way they are made, they can't actually *use* the bucket or crafting table. But you can make them simulate it. Such as for the bucket of water you could, put a bucket of water in their hands, swing their arm and place some water in front of them, then replace the bucket in their hands with an empty one. It would look like they actually used a bucket, when really they didn't.
Osimon thank you! is there a detect funtion for their inventory? like if they have items A B and C then give them item D and take items ABC to simulate crafting?
how do i use the function "setOwner()"? Bcuz i tried using npc, player and event but they didn't work. I just want to know if there's another way to command them through dialog. It'd mean a lot if someone could actually tell me what to use or how to make it work.
Thanks so much, man! This video was really helpful! Anyway, I'm kind of a programming noob, and therefore I wonder if there is an easy way to make a certain block spawn at a specific set of coordinates when a NPC is, say, killed or spoken to or whatever. I'm pretty stuck on this problem, so help would be much appreciated :)
how does someone make a legit puppet musicbox timer, and an alarm go off as the timer goes off? can someone give me the script to that? (and a play sound script?)
Is it possible to access the minecraft stuff aswell? Like net.minecraft.util.BlockPos for example? Something like var BlockPos = net.minecraft.util.BlockPos; // This does not work - doesn't know class net
i don't understand any of this (i haven't watched the vid, i know weird but i have no where else to ask) i am looking for a way to make customnpcs build and move a certain way, for example, close a door, say "let's make sure no one can hear us" and then turn towards me, shift, and sit on a chair, grab an object from a chest, and give the object to me while saying "here are the documents, now you must go" or something like that. is scripting what i should use? then how do i use it?
+Lily Evanora Yes you would need scripting for that. What you're wanting to achieve could be done using state logic. Do you have any previous experience with coding?
Osimon no :/ i was looking for an alternative.. like maybe a mod or something i could download to make certain things happen. but i don't think there is. i don't know if i can code. my parents tell me i should since i use computers 24/7 practically, but i'm not sure what it really does. maybe you could give me steps on how to set everything up?
Squaramashow Parodies Well, I found when I first learnt how to code, that the best way to learn is to experiment. Change bits of the code to see what it does and try to do things yourself before searching up how to do it. By default Custom NPCs just uses Javascript so any Javascript tutorial would help you learn. I learnt many years ago on a site called Tizag, it's still around I think
Arah Are you just wanting the NPC to attack a specific player? Or just any player in range? Because by default you can set them to attack any player within a range without using scripts.
Arah You could try use something along the lines of: var target = event.getTarget(); if (!target || target.getType() != 1 || target.getName() != "Player name") { event.setTarget(null); } What this does is it checks to see what the target is, then if it's a player it checks the name. Only if the target exists, is a player and has the given name will it then target that player, otherwise it will ignore every other target. This does have it's consequences though, it can cause a bit of confusion when multiple people are surrounding it. But with just a few players it should be alright.
Hey there, I just want to say great videos! You've earned a subscriber :) I have a request, would you be able to make an NPC be able to turn into different saved NPCs? I.e; Go from Zombie to skeleton to creeper, it would really help with my plans to create a multi tier boss fight. If you could do that, I would be the most grateful person ever. Also, a few videos ago, I saw a comment that asked for something along the lines of having an NPC unable to see you in certain light levels, if you could do that aswell, I'd be even more grateful. Thanks ^-^
Gabriel Mccardle I can look into it if you'd like. I've been a bit busy lately with other stuff but I have done all the code to work with the light levels. I just haven't got around to recording the video yet.
One of my biggest problems is reading Noppes API. Like right now I can't understand how to work with any of the scoreboard methods. How do I figure it out.
Daot finally figured it out:
world.getScoreboard().getPlayerScore("daotdlog","Deaths","")
Hey Osimon I wanna know do you know how Aphmau makes her custom npc's do what they do. Like how they talk in color and then it switches to a diffrent one after? She also makes their heads and makes them move but I doubt it's the wand because their movement is so strange they jump and do all these thing can you help?
Hi what is that npcp (npc+) thing? You didn't show where you created the object (stored in world tempData), thanks in advance!
how do you get theme to take damage
plz come back Osimon we want you back
It would be awesome if you could make use of the minecraft source codes to make the npcs copy structures and build them elsewhere
Medixum That sounds like a fun challenge, I'll add it to list of things to try. :)
Could you use this to get the metadata for wheat etc to create a farmer who checks for the wheat to be fully grown and then faux farms it and replants it?
Nicole Sijnja Yes you could, good idea! If I remember correctly, the metadata value for fully grown crops is 7. You should give it a try and see what happens.
Osimon I have been trying to work out a way to do this, so that we have a very alive feeling to our villages we are building. I will certainly give this a try!
how do you get them to use right-click functions like using a bucket, and how do you get them to use a crafting table?
Arothin Lasgalen Because of the way they are made, they can't actually *use* the bucket or crafting table. But you can make them simulate it. Such as for the bucket of water you could, put a bucket of water in their hands, swing their arm and place some water in front of them, then replace the bucket in their hands with an empty one. It would look like they actually used a bucket, when really they didn't.
Osimon thank you! is there a detect funtion for their inventory? like if they have items A B and C then give them item D and take items ABC to simulate crafting?
Osimon how to change skin in minecraft version mod forge ??
how do i use the function "setOwner()"? Bcuz i tried using npc, player and event but they didn't work. I just want to know if there's another way to command them through dialog. It'd mean a lot if someone could actually tell me what to use or how to make it work.
Thanks so much, man! This video was really helpful! Anyway, I'm kind of a programming noob, and therefore I wonder if there is an easy way to make a certain block spawn at a specific set of coordinates when a NPC is, say, killed or spoken to or whatever. I'm pretty stuck on this problem, so help would be much appreciated :)
I'm on 1.8.0 if that makes any difference.
how does someone make a legit puppet musicbox timer, and an alarm go off as the timer goes off? can someone give me the script to that? (and a play sound script?)
Is it possible to access the minecraft stuff aswell? Like net.minecraft.util.BlockPos for example?
Something like
var BlockPos = net.minecraft.util.BlockPos; // This does not work - doesn't know class net
i don't understand any of this (i haven't watched the vid, i know weird but i have no where else to ask) i am looking for a way to make customnpcs build and move a certain way, for example, close a door, say "let's make sure no one can hear us" and then turn towards me, shift, and sit on a chair, grab an object from a chest, and give the object to me while saying "here are the documents, now you must go" or something like that. is scripting what i should use? then how do i use it?
+Lily Evanora Yes you would need scripting for that. What you're wanting to achieve could be done using state logic. Do you have any previous experience with coding?
Osimon no :/ i was looking for an alternative.. like maybe a mod or something i could download to make certain things happen. but i don't think there is. i don't know if i can code. my parents tell me i should since i use computers 24/7 practically, but i'm not sure what it really does. maybe you could give me steps on how to set everything up?
just say '' o hai ima grill gamer, make screeptz for mi plz'' and you will be good to go.
Thanks a lot for your tutorial.
What is the best way to learn coding npc script?
Language & Examples?
Squaramashow Parodies Well, I found when I first learnt how to code, that the best way to learn is to experiment. Change bits of the code to see what it does and try to do things yourself before searching up how to do it. By default Custom NPCs just uses Javascript so any Javascript tutorial would help you learn. I learnt many years ago on a site called Tizag, it's still around I think
Squaramashow Parodies www.w3schools.com/ is a great source for Javascript
If I wanted a npc to target and attack a certain player when he gets in range, how would I do this? I'm so confused.
Arah Are you just wanting the NPC to attack a specific player? Or just any player in range? Because by default you can set them to attack any player within a range without using scripts.
A certain player when they come into range.
Arah You could try use something along the lines of:
var target = event.getTarget();
if (!target || target.getType() != 1 || target.getName() != "Player name") {
event.setTarget(null);
}
What this does is it checks to see what the target is, then if it's a player it checks the name. Only if the target exists, is a player and has the given name will it then target that player, otherwise it will ignore every other target. This does have it's consequences though, it can cause a bit of confusion when multiple people are surrounding it. But with just a few players it should be alright.
Aah thank you! One more question, what tab in the scripting section would I put this?
I'm using 1.7.10 but it says it can't find the function getTarget
How to do a Lumberjack??
Fury&Fly Officiel What do you mean by lumberjack? Like an NPC that wanders around cutting down trees?
Hey there, I just want to say great videos! You've earned a subscriber :)
I have a request, would you be able to make an NPC be able to turn into different saved NPCs? I.e; Go from Zombie to skeleton to creeper, it would really help with my plans to create a multi tier boss fight. If you could do that, I would be the most grateful person ever. Also, a few videos ago, I saw a comment that asked for something along the lines of having an NPC unable to see you in certain light levels, if you could do that aswell, I'd be even more grateful. Thanks ^-^
Gabriel Mccardle I can look into it if you'd like. I've been a bit busy lately with other stuff but I have done all the code to work with the light levels. I just haven't got around to recording the video yet.
Osimon It's alright, take your time, aslong as you enjoy what you do, keep doing it :)