Downloads containing ab20ctf06.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 20 Levels Jazz2Online Multiple N/A Download file

File preview

/* Carrots cannot be buried in the ground with toaster 1.0, by PurpleJazz 
   http://www.jazz2online.com/snippets/100/carrots-cannot-be-buried-in-the-ground-with-toaster/ */

void onLevelLoad() {
jjUseLayer8Speeds = true;

	jjObjectPresets[OBJECT::FULLENERGY].behavior = CantBeBuried;
	
	jjPAL standard; //we need to declare an instance of jjPAL before we can load any new palettes
	standard.load("Diam2.j2t"); //since everyone most likely has this tileset in their JJ2 folder
	jjPalette.copyFrom(16, 40, 16, standard, 1);
	jjPalette.copyFrom(59, 37, 59, standard, 1); //don't copy over entries 56-58 as they are unused by the JJ2 sprite palette, and replacing them could have unwanted side effects if they are utilised in the tileset
	jjPalette.apply();
}

void CantBeBuried(jjOBJ@ obj) {
	obj.behave(BEHAVIOR::PICKUP);
	if (jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 8)) {
		obj.state = STATE::FLOAT;
	}
}