Downloads containing ab24ctf09.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 24 CTF Jazz2Online Capture the flag N/A Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
#include "MLLE-Include-1.5.asc" ///@MLLE-Generated
#pragma require "ab24ctf09-MLLE-Data-2.j2l" ///@MLLE-Generated
#pragma require "ab24ctf09-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "ab24ctf09.j2l" ///@MLLE-Generated

void onLevelLoad() {
      jjPIXELMAP rain(32,32);
	for (uint x = 0; x < rain.width; ++x) {
		for (uint y = 0; y < rain.height; ++y) {
			if (x == 16) {
				if (y <= 16) rain[x,y] = 75;
				else if (y > 16 && y <= 24) rain[x,y] = 74;
				else rain[x,y] = 0;
			} else {
				rain[x,y] = 0;
			}
		}
	}

      jjANIMATION@ anim = jjAnimations[jjAnimSets[ANIM::COMMON].firstAnim + 2];
      for (uint frameID = 0; frameID < anim.frameCount; ++frameID) {
        jjANIMFRAME@ frame = jjAnimFrames[anim.firstFrame + frameID];
        rain.save(frame);
        frame.hotSpotX = -frame.width/2;
        frame.hotSpotY = -frame.height;
      }

}

void CannotBeShotDown(jjOBJ@ obj) {
    obj.behave(BEHAVIOR::PICKUP);
    if (obj.state == STATE::FLOATFALL)
        obj.state = STATE::FLOAT;
}


	void ashFallout() {
		for (int i = 0; i < 1024; i++) {
			jjPARTICLE@ particle = jjParticles[i];
			if (particle.type == PARTICLE::FLOWER) {
				particle.xSpeed = 0.25;
				particle.ySpeed = 3;
				particle.type = PARTICLE::SMOKE;
			}
			if (particle.type == PARTICLE::SMOKE) {
				particle.ySpeed = jjLocalPlayers[0].ySpeed < 0? 3 : int(3 + jjLocalPlayers[0].ySpeed);
				if (jjMaskedPixel(int(particle.xPos), int(particle.yPos))) {
					particle.type = PARTICLE::INACTIVE;
				}
			}
			if (particle.type == PARTICLE::FIRE) {
				particle.fire.size = particle.fire.color == 40? 3:2;
			}
		}
	}

void onMain() {
    jjIsSnowing = true;
    
    for (int i = 0; i < 1024; i++) {
        jjPARTICLE@ particle = jjParticles[i];
        if (particle.type == PARTICLE::SNOW) {
            particle.type = PARTICLE::INACTIVE;
            jjPARTICLE@ smoke = jjAddParticle(PARTICLE::SMOKE);
            smoke.xPos = particle.xPos;
            smoke.yPos = particle.yPos;
            smoke.xSpeed = 0.25;
            smoke.ySpeed = 3;
        }
        if (particle.type == PARTICLE::SMOKE) {
            particle.ySpeed = jjLocalPlayers[0].ySpeed < 0? 3 : int(3 + jjLocalPlayers[0].ySpeed);
            if (jjMaskedPixel(int(particle.xPos), int(particle.yPos))) {
                particle.type = PARTICLE::INACTIVE;
            }
        }
    }
}