Downloads containing OLCCast.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 17 Levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: CastamereFeatured Download Blackraptor Capture the flag 8.5 Download file

File preview

void onLevelLoad() {
	jjObjectPresets[OBJECT::PINKPLATFORM].behavior = Elevator;
	jjObjectPresets[OBJECT::PINKPLATFORM].determineCurAnim(ANIM::BAT, 0);
	jjObjectPresets[OBJECT::PINKPLATFORM].state = STATE::FADEIN;
	jjObjectPresets[OBJECT::PINKPLATFORM].lightType = LIGHT::NORMAL;
	jjObjectPresets[OBJECT::PINKPLATFORM].light = 24;
	jjTexturedBGStyle = TEXTURE::TUNNEL;
	
	jjObjectPresets[OBJECT::FULLENERGY].lightType = LIGHT::BRIGHT;
	jjObjectPresets[OBJECT::FULLENERGY].light = 14;
	
	jjObjectPresets[121].behavior = Smoker;
}

void Elevator(jjOBJ@ obj) {
		switch (obj.state) {			
		case STATE::FADEIN:
			obj.xPos = obj.xOrg + 16;
			obj.yPos = obj.yPos - 2.5;
			
			if (jjGameTicks%4 == 0) obj.counter++;
			if (obj.counter > 7) {
				if (jjSoundEnabled) jjSample(obj.xPos, obj.yPos, SOUND::COMMON_BIRDFLY2, 32);
				obj.counter = 0;
			}
			
			if (obj.yPos < 29*32) obj.state = STATE::FADEOUT;
			break;
			
		case STATE::FADEOUT:
			obj.xPos = obj.xOrg + 16;
			obj.yPos = obj.yPos + 1.5;
			if (obj.yPos > 85*32) obj.state = STATE::FADEIN;
			break;
	}	
	float batoffset = jjSin(jjGameTicks*2.00)*140;
	obj.xPos = obj.xPos + batoffset;
	if (batoffset == 140 && obj.direction == 0)
		obj.direction = -1;
	else if (batoffset == -140 && obj.direction == -1)
		obj.direction = 0;
		
	obj.beSolid();
	
	jjDrawSprite(
		obj.xPos,
		obj.yPos - 8,
		ANIM::BAT,
		0,
		obj.state == STATE::FADEIN? obj.counter : 4,
		obj.direction,
		SPRITE::NORMAL
	);
}

void Smoker(jjOBJ@ obj) {
	if (obj.state == STATE::START && obj.lightType == LIGHT::LASER) obj.lightType = LIGHT::FLICKER;
	if (jjRandom()&21 == 0) {
		jjPARTICLE@ smoke = jjAddParticle(PARTICLE::SMOKE);
		if (smoke !is null) {
			smoke.xPos = obj.xOrg;
			smoke.yPos = obj.yOrg - 8;
		}
	}
}

void onPlayer(jjPLAYER@ p) {
	if (p.platform > 0 && jjObjects[p.platform].state == STATE::FADEIN && !p.keyLeft && !p.keyRight) {
		p.xPos = jjObjects[p.platform].xPos;
	}
}

void onFunction5(jjPLAYER@ player) {
	player.showText("@@@Blood to bind and love to damn me@Formed in clay, the fire has made me faceless@Torn to shreds, but I'm still standing@Never sleeping and never blinded@@. . .@@Blood to bind and love to damn me@See me now and know that I am faceless@Blood that is purer than the poison in your veins;@Love that runs truer than the hatred and the pain...");
	}