Quote from TheZ3R0312
create a variable like outOfRange or something like that set it to false originally, then do a for loop like you had so something like this:
something like this, idk if this will work but it should or be very close
var outOfRange = false; var ents = follower.getEntitiesWithinRange(7); for (var i=0; i<ents.length; i++) { if(targets[i].getClassType() == "Player") { outOfRange = false; } if(targets[i].getClassType() != "Player") { outOfRange = true; } } if(outOfRange) { follower.pathToEntity(player); }
So I figured out what the problem is, the only instance it checks for is whether an entity next to it is the player or not. For example, with me standing next to the follower, it does nothing. However, when I place an NPC next to it, that entity is not the player, so then follower will walk to me. What I need to do is figure out how to switch the instances around so it looks something like this (although with proper coding):
var outOfRange = false; for (var i=0; i<ents.length; i++) { if (targets[i].getClassType(Player) == withinRange(7)) { outOfRange = false; } if(targets[i].getClassType(Player) != withinRange(7)) { outOfRange = true; } } if(outOfRange) { follower.pathToEntity(player); }
16
TO GET IT GO HERE:[/center]
[center]THIS MAP IS BACK UP AND UNDER CONSTRUCTION PLEASE BE PATIENT THERE WILL BE NO FURTHER RELEASES UNTIL THE MAP IS 100% PERCENT DONE. UPDATES CAN BE SEEN ON MY YOUTUBE CHANNEL: http://www.youtube.com/user/TheZ3R0312[/center]
[center]The new website is up! Check it out here: http://zerodesignco.weebly.com/[/center]
[center]VIDEOS[/center]
[center]Scripts:[/center]
[center]Money Gui:[/center]
[center]Epona:[/center]
[center]Deku sticks, arrow switches, etc. :[/center]
[center]Updates: [/center]
[center][/center]
[center][/center]
[center][/center]
[center][/center]
[center][/spoiler][/center]
[center]New pictures will be posted throughout the process[/center]
Model of the first boss Gohma
New Banner Done by me!
Here is the AMAZING banner that CAKEZ made! Use it to spread the word!!
Please make donations to support this map! You can make donations to support a 24 hour server, or donations to fix my laptop which had soda spilled all over it or just make donations for the effort that has been put into this map. Its been a 3 month project that a lot of blood and sweat has gone into. If you make a donation you will be listed in the credits for the map, as well as on this page.
[center]
2
2
1
yep check the adventurecraft wiki here: http://adventurecraft.wikkii.com/wiki/Script_guide#ScriptEntity_Class
1
the same way you would normally make a model, just dont add any extra boxes if you know what im talking about. then spawn that entity on load. Im going to making a script similar to this soon if you want to see it.
1
here zeldacraft ill help you out a little, this is example code on how to mount the horse and move forward, you need to figure out the rest:
1
3
4
If you use my scripts please give me credit somewhere in your map!
Guards v.1:
Watch at the 4:16 mark to see the guards
Download: http://www.mediafire...9y1wwhz37nz6ayz
Deku Stick v.1:
Watch at the :38 to see the deku stick
Download: http://www.mediafire...mdcg072k2u4db26
Bow Trigger v.1:
Watch from the start
Download: http://www.mediafire...s7jcig4qss8xopf
2
http://www.minecraft...ecraft-scripts/