Downloads containing folctf02n.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 20 Levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: Anniversary Bash 16 Levels Jazz2Online Multiple N/A Download file
JJ2+ Only: Sky Gardens Foly Capture the flag N/A Download file

File preview

     // - - - - - - - - - - - - - - - //
    // -  Made by: Foly            - //
   // - Last Edit: 24-08-2013     - //
  // - - - - - - - - - - - - - - - //
  
  
  // - - - - - - - - - - //
 // - Other Functions - //
// - - - - - - - - - - //
bool ObjectInArea(int x1, int y1, int x2, int y2, int objectID) {
	jjOBJ@ obj = jjObjects[objectID];
	return (obj.xPos > (x1 - 1)*32 && 
			obj.xPos < x2*32 &&
			obj.yPos > (y1 - 1)*32 &&
			obj.yPos < y2*32);
}


  // - - - - - - - - - - //
 // - Main Functions  - //
// - - - - - - - - - - //
void onMain() {
  	for (int i = 0;	i < jjObjectCount; i++) {
		jjOBJ@ obj = jjObjects[i];
		if (obj.isActive)
			switch (obj.eventID) {
				case (OBJECT::CARROT):
				case (OBJECT::FULLENERGY):
					if (ObjectInArea(91, 51, 97, 54, i) || ObjectInArea(99, 51, 100, 53, i)) {
						obj.xPos = 97*32 + 8;
						obj.yPos = 51*32 + 16;
						obj.xSpeed = 0;
						obj.ySpeed = 0;
					}
				default:
					break;
			}
	}
}