Downloads containing ab22ctf01.j2as

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

File preview

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

void onLevelLoad() {
	jjTexturedBGTexture = TEXTURE::RANEFORUSV;
	jjUseLayer8Speeds = true;
	jjObjectPresets[OBJECT::BOUNCERBULLET].behavior = bouncer;

	 jjLayerOrderSet(array<jjLAYER@> = {jjLayers[2], jjLayers[3], jjLayers[4], jjLayers[5], jjLayers[6], jjLayers[7], jjLayers[1], jjLayers[8]});
}

void onMain() {

	for (int i = 1; i < jjObjectCount; i++) { 
	   jjOBJ@ o = jjObjects[i];
	   if (o.isActive) {
	       if (o.behavior == BEHAVIOR::PICKUP && o.state == STATE::FLOATFALL) {
		     o.state = STATE::FLOAT;
	        }
	   }
	}
}

void bouncer(jjOBJ@ obj) {
    float xSpeed = obj.xSpeed;
    float ySpeed = obj.ySpeed;
    obj.behave(BEHAVIOR::BOUNCERBULLET);
    if (xSpeed * obj.xSpeed < 0.f && ySpeed * obj.ySpeed < 0.f) {
        if (!jjMaskedPixel(int(obj.xPos + obj.xSpeed), int(obj.yPos + ySpeed))) {
            obj.var[0] = obj.var[0] - 1;
            obj.ySpeed = ySpeed;
            if (ySpeed > 0.f)
                obj.yPos += ySpeed;
        }
    }
}