Hey guys, can anyone quickly tell me how i would do this thanks
well i have got all my Projectile done well most but i rushed them and coded them shit.
can anyone please tell me how i would change it into an array like this
Code:
private static final int[][] arrows = new int[][]{{385, 20}};
Thanks
Edit: this is what i got at the moment
Code:
public void rangeProjectile2(Player p, NPC p2) {
int offsetX = (p.absX - p2.absX) * -1;
int offsetY = (p.absY - p2.absY) * -1;
p.frames.createGlobalProjectile(p.absY, p.absX, offsetY,
offsetX, arrow(p.equipment[13]), 53, 31, 95, p2.npcId);
}
public int arrow(int id) {
if (id == 882) {
return 10;
}
if (id == 9236 || id == 9244) {
return 27;
}
if (id == 884) {
return 11;
}
if (id == 886) {
return 12;
}
if (id == 888) {
return 13;
}
if (id == 890) {
return 14;
}
if (id == 11212) {
return 1120;
}
if (id == 892) {
return 15;
}
return 15;
}
Thanks again.