Downloads containing mo4a_credits.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Mystery of the Four... chandie Single player 6.6 Download file

File preview

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

void onLevelLoad() {
	jjLevelName = ("");
}

void onPlayer(jjPLAYER@ p) {
	p.idle = 100;
	p.keyRun = false;
	p.keyLeft = false;
	p.lightType = LIGHT::NONE;
	p.keyUp = false;
	p.keyDown = false;
	p.keyRight = false;



if(p.keyFire && p.yPos > 12*32)
jjNxt(false, true);

if(p.keyJump && p.yPos > 12*32)
jjNxt(false, true);

if(p.keySelect && p.yPos > 12*32)
jjNxt(false, true);
}


bool onDrawHealth(jjPLAYER@ p, jjCANVAS@ canvas) {return true;}

bool onDrawLives(jjPLAYER@ p, jjCANVAS@ canvas)  {return true;}
bool onDrawScore(jjPLAYER@ p, jjCANVAS@ canvas)  {return true;}
bool onDrawAmmo(jjPLAYER@ p, jjCANVAS@ canvas)   {return true;}


jjTEXTAPPEARANCE SignTextAppearance = STRING::NORMAL;
class Sign {
	private int xPos, yPos; //These pixel-based positions will be generated from tile-based positions in the constructor by multiplying by 32
	private string text;
	private uint widthOfText;
	Sign(){} //AngelScript requires any class that appears in any array to have an explicit default constructor, even if it's never called
	Sign(int xTile, int yTile, const string &in t) {
		xPos = xTile * 32; //Since this is a constant operation, it could strictly be performed in the draw method instead of the constructor, but this way involves fewer multiplication instructions
		yPos = yTile * 32; //
		text = t;
		SignTextAppearance.newline = STRING::SPECIALSIGN; //Causes the drawString method to interpret instances of the \n character as signals to drop down to a new line, similar to the special effect of the @ character in the STRING::SPIN appearance.
		SignTextAppearance.spacing = -2; //int jjTEXTAPPEARANCE::spacing is new in 5.2, and this particular value is equivalent to prefixing the string with "ยง2". Make sure to check out bool jjTEXTAPPEARANCE::monospace too, though it didn't end up getting used in this level.
		widthOfText = jjGetStringWidth(text, STRING::SMALL, SignTextAppearance); //Used for determining how large of a dark rectangle should be drawn behind the text. A matching heightOfText value could of course be generated by counting the number of newline characters--for example, "heightOfText = text.split("\n").length * 20;"--but here the rectangles are constant height instead to limit the temptation to ramble on and on.
	}
	void draw(jjCANVAS@ layer, uint8 textIntensity) const { //Because this method will be called from an onDraw method, it's important to have a jjCANVAS@ passed among the arguments.
		//layer.drawRectangle(xPos, yPos - 16, widthOfText + 8, 55, 0, SPRITE::TRANSLUCENT);
		layer.drawString(xPos, yPos, text, STRING::SMALL, SignTextAppearance, 0, SPRITE::BLEND_HARDLIGHT, textIntensity);
	}
}
const array<Sign> Signs = { 
	Sign(1, 23, "LEVEL DESIGN, STORY AND TILESETS\nChandie\n\n\n\nDEVELOPMENT\n\nViolet CLM\n'Wall Jump'\n'Extendable Checkpoints'\n'Jazz1 Enemies'\n'Kangaroo'\n'Custom Weapons'\nand else.\n\nBloody_Body\n'Sugar Rush Indicator'\n'Spitting Bubba'\n'WitchBoss'\n\nPurpleJazz\n'Arcane Weapons'\n'Limited Air Supply Underwater'\n\nJ2O Community who have contributed\nonHH18SaveGems script.\n\nChandie\n\n\n\nMUSIC\n\nCamille Saint Saens\n'Cuckoo in the Woods'\n'Aquarium'\n\nEric Chevalier\n'Doc's Cave'\n'The Ancient Lava Temple'\n'The Lava Stream'\n'Riding the Shell'\n'Umber's Sacrifice'\n'South Plain'\n\nGilles Leveille\n'The Golden City'\n'Carpet Chase'\n\nMystical\n'Midnight in Arabia'\n\n-from ModArchive-\n'Warlord Theme'\n\n-from Ninja Dodo's The Lost World-\n'Breaking the Waves'\n\nKlown Killer\n'Pharaoh's Believe'\n\nSleipner\n'Indian Ritual'\n\nGopher\n'The Corsair's Voyage'\n\nCynmusic\n'Here is Amor'!\n\n\n\nBETA TESTING\nVioletCLM\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThank you for playing!"),


};

void onDrawLayer4(jjPLAYER@, jjCANVAS@ layer) { 
	const uint8 textIntensity = 200 ; 
	for (uint signID = 0; signID < Signs.length; ++signID) 
		Signs[signID].draw(layer, textIntensity);

}