Quote:
Originally Posted by xXziroXx
PHP Code:
for (temp.i = 0; temp.i < 2; temp.i++) {
for (temp.obj: i ? npcs : players) {
if (this.x in |obj.x, obj.x + 3| && this.y in |obj.y, obj.y+ 3|) {
//hit stuff
}
}
}
There, now you have a loop for both players and NPC's.
|
Why would I need a loop for the player
and for the Projectile?
o_O