Downloads containing xlmzes.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 22 levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: Anniversary Bash 18 Levels Jazz2Online Multiple N/A Download file
JJ2+ Only: ZesFeatured Download DarkSonic Battle 8.3 Download file

File preview

#pragma require "BubbleGun.j2a"

void onLevelLoad() {
	jjAnimSets[ANIM::CUSTOM[0]].load(0, "BubbleGun.j2a");
	jjAnimSets[ANIM::CUSTOM[1]].load(1, "BubbleGun.j2a");
	jjAnimations[jjAnimSets[ANIM::AMMO] + 29] = jjAnimations[jjAnimSets[ANIM::AMMO] + 8];
	jjAnimations[jjAnimSets[ANIM::AMMO] + 28] = jjAnimations[jjAnimSets[ANIM::CUSTOM[0]] + 0];
	
	jjObjectPresets[OBJECT::ICEBULLET].special = jjObjectPresets[OBJECT::ICEBULLET].determineCurAnim(ANIM::AMMO, 8);
	jjObjectPresets[OBJECT::ICEBULLET].behavior = BubbleGun;
	jjObjectPresets[OBJECT::ICEBULLET].xSpeed = 1.5;
	jjObjectPresets[OBJECT::ICEBULLET].counterEnd = 105;
	jjObjectPresets[OBJECT::ICEBULLET].var[6] = 0;
	jjObjectPresets[OBJECT::ICEBULLET].freeze = 0;
	jjObjectPresets[OBJECT::ICEBULLET].lightType = jjObjectPresets[OBJECT::BLASTERBULLET].lightType;

	jjObjectPresets[OBJECT::ICEBULLETPU].special = jjObjectPresets[OBJECT::ICEBULLETPU].determineCurAnim(ANIM::CUSTOM[0], 0);
	jjObjectPresets[OBJECT::ICEBULLETPU].behavior = BubbleGunPU;
	jjObjectPresets[OBJECT::ICEBULLETPU].xSpeed = 2;
	jjObjectPresets[OBJECT::ICEBULLETPU].counterEnd = 105;
	jjObjectPresets[OBJECT::ICEBULLETPU].var[6] = 0;
	jjObjectPresets[OBJECT::ICEBULLETPU].freeze = 0;
	jjObjectPresets[OBJECT::ICEBULLETPU].lightType = jjObjectPresets[OBJECT::BLASTERBULLET].lightType;
	
	jjObjectPresets[OBJECT::ICEPOWERUP].determineCurAnim(ANIM::CUSTOM[1], 0, true);
	
	jjWeapons[WEAPON::ICE].spread = SPREAD::NORMAL;
	jjWeapons[WEAPON::ICE].defaultSample = false;
	
	jjUseLayer8Speeds = true;
	jjTexturedBGTexture = TEXTURE::WISETYNESS;
}

void BubbleGun(jjOBJ@ bubble) {
    if (bubble.state == STATE::START) {
		bubble.state = STATE::FLY;
		jjSample(bubble.xPos, bubble.yPos, SOUND::COMMON_PLOP2, 0, 0);
	}
	
	if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
		jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT, 0, 0);
	}
	
	bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
	bubble.killAnim = jjObjectPresets[OBJECT::WATERSHIELDBULLET].killAnim;
}

void BubbleGunPU(jjOBJ@ bubble) {
	if (bubble.state == STATE::START) {
		bubble.state = STATE::FLY;
		jjSample(bubble.xPos, bubble.yPos, SOUND::COMMON_PLOP2, 0, 0);
	}

	if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
		jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT, 0, 0);
	}
	
	bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
	
	if (bubble.state == STATE::FLY && bubble.counter > 0) {
		switch (bubble.direction) {
			case 1: bubble.xSpeed = bubble.xSpeed - 0.1; bubble.ySpeed = bubble.ySpeed - 0.08; break;
			case -1: bubble.xSpeed = bubble.xSpeed + 0.1; bubble.ySpeed = bubble.ySpeed - 0.08; break;
		}
	}
	
	bubble.killAnim = jjObjectPresets[OBJECT::WATERSHIELDBULLET].killAnim;
}