Downloads containing mlsacr.j2as

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

File preview

  1. void WheelSpring(jjOBJ@ obj) {
  2.         if (obj.state == STATE::START) obj.direction = 1;
  3.  
  4.         float xPos = obj.xPos;
  5.         obj.behave(BEHAVIOR::SPRING, false);
  6.         obj.yPos = obj.yOrg + 8;
  7.        
  8.         if (obj.eventID == OBJECT::BLUESPRING) obj.ySpeed = -48;
  9.        
  10.         if (obj.freeze == 1) obj.unfreeze(0);
  11.         if (obj.freeze == 0) obj.xPos = xPos + 1.5*obj.direction;
  12.        
  13.         if (!jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 32) || jjMaskedPixel(int(obj.xPos)+16*obj.direction, int(obj.yPos-16))) {
  14.                 if (obj.direction == 1) obj.direction = -1;
  15.                 else obj.direction = 1;
  16.         }
  17.         jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos - 4, obj.curFrame, 0, obj.freeze > 0 ? SPRITE::FROZEN : SPRITE::NORMAL);
  18.         jjDrawTile(obj.xPos - 16, obj.yPos - 8, obj.freeze > 0? 593 + TILE::HFLIPPED : obj.direction < 0? 1 + TILE::ANIMATED : 2 + TILE::ANIMATED);
  19. }
  20.  
  21. void Lantern(jjOBJ@ light) {
  22.         jjDrawTile(light.xPos - 15, light.yPos - 15, 288);
  23.         light.behave(BEHAVIOR::STEADYLIGHT);
  24. }
  25.  
  26. void onLevelLoad() {
  27.         jjObjectPresets[OBJECT::STEADYLIGHT].behavior = Lantern;       
  28.         jjObjectPresets[OBJECT::FULLENERGY].lightType = LIGHT::BRIGHT;
  29.         jjObjectPresets[OBJECT::FULLENERGY].light = 14;
  30.         jjTexturedBGTexture = TEXTURE::MEDIVO;
  31.         jjPalette.gradient(24,32,96, 0,0,0);
  32.         jjPalette.apply();
  33.  
  34.         jjLayerYOffset[2] = 8; 
  35.         jjLayerYOffset[6] = -16;
  36.        
  37.         jjSetWaterGradient(0, 30, 30, 0, 250, 250);
  38.         jjWaterLighting = WATERLIGHT::GLOBAL;
  39.         jjSetWaterLevel(60.5*32, true);
  40.        
  41.         jjDelayGeneratedCrateOrigins = true;
  42.        
  43.         jjWeapons[WEAPON::ICE].comesFromGunCrates    = false;
  44.         jjWeapons[WEAPON::SEEKER].comesFromGunCrates = false;
  45.         jjWeapons[WEAPON::GUN8].comesFromGunCrates   = true;
  46.         jjWeapons[WEAPON::GUN9].comesFromGunCrates   = true;
  47. }
  48.  
  49. void onLevelBegin() {
  50.         jjObjects[jjAddObject(OBJECT::BLUESPRING,  64*32, 56*32, 0, CREATOR::OBJECT, WheelSpring)].deactivates = false;
  51.         jjObjects[jjAddObject(OBJECT::GREENSPRING, 64*32, 21*32, 0, CREATOR::OBJECT, WheelSpring)].deactivates = false;
  52.        
  53.         for (int i = 1; i < jjObjectCount; i++) {
  54.                 jjOBJ@ obj = jjObjects[i];
  55.                 if (obj.eventID == OBJECT::CTFBASE && obj.xOrg > 65*32) {
  56.                         obj.yOrg = obj.yOrg + 16;
  57.                 }
  58.         }
  59. }
  60.  
  61. void onMain() {
  62.         jjIsSnowing = !jjLowDetail;
  63.         jjTexturedBGTexture = jjLowDetail ? TEXTURE::LAYER8 : TEXTURE::MEDIVO;
  64. }
  65.  
  66. void onDrawLayer4(jjPLAYER@ play, jjCANVAS@ layer) {
  67.         layer.drawTile(101*32, 36*32, 32);
  68.         layer.drawTile(101*32, 37*32, 30);
  69. }