I think that a break statement should do the trick... So:
Hope that works...Code:for (var i:Number = 0; i < Main.floors.length; i++) { if (Main.floors[i].hitTestObject(this)) { grav = 0; jumped = false; break; //////////THIS LINE } else { grav++; } }




Reply With Quote