Zawy 1037 Posted June 14, 2016 http://pastebin.com/anXWWrHc http://webcache.googleusercontent.com/search?q=cache%3Apastebin.com%2FanXWWrHc&oq=cache%3Apastebin.com%2FanXWWrHc%C2%A0&aqs=chrome..69i57j69i58.1563j0j4&sourceid=chrome&ie=UTF-8
Dreamlicker 750 Posted June 14, 2016 Always good to have more snippets available. It's helpful to comment your code so you can explain to others exactly what is happening as well, especially new scripters
Cardozz 46 Posted June 14, 2016 Thank you for providing the way you code scripts. I will definetely take a look at it!
Constuck 13 Posted June 14, 2016 Thank you so much! Snippets from more experienced scripters are pure gold for newbies.
Mad 86 Posted June 14, 2016 private boolean weKnowWhereItIs () { for (int i = 0; i < areaStatus.length; i++) if (areaStatus[i] == 1) return true; return false; } private int indexOfWhereItIs () { for (int i = 0; i < areaStatus.length; i++) if (areaStatus[i] == 1) return i; return -1; } this could just be 1 function, indexOfwhereItIs, you dont need the other 1
Hashtag 9077 Author Posted June 14, 2016 private boolean weKnowWhereItIs () { for (int i = 0; i < areaStatus.length; i++) if (areaStatus[i] == 1) return true; return false; } private int indexOfWhereItIs () { for (int i = 0; i < areaStatus.length; i++) if (areaStatus[i] == 1) return i; return -1; } this could just be 1 function, indexOfwhereItIs, you dont need the other 1 Good point! I am not exactly sure why I ended up writing it like that. Anyone who uses this is free to modify and improve the code =)
SolarBlaze 0 Posted June 19, 2016 I've been using this script and it is great ! I found just one problem, in a specific position of the saltpetre mine it gets stuck because its too far from the mine and then the camera angle can click on it. How do I make the player go closer to the saltpetre in order to prevent this ??
Recommended Posts
Archived
This topic is now archived and is closed to further replies.