Downloads containing xlmzes.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 22 levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: Anniversary Bash 18 Levels Jazz2Online Multiple N/A Download file
JJ2+ Only: ZesFeatured Download DarkSonic Battle 8.3 Download file

File preview

  1. #pragma require "BubbleGun.j2a"
  2.  
  3. void onLevelLoad() {
  4.         jjAnimSets[ANIM::CUSTOM[0]].load(0, "BubbleGun.j2a");
  5.         jjAnimSets[ANIM::CUSTOM[1]].load(1, "BubbleGun.j2a");
  6.         jjAnimations[jjAnimSets[ANIM::AMMO] + 29] = jjAnimations[jjAnimSets[ANIM::AMMO] + 8];
  7.         jjAnimations[jjAnimSets[ANIM::AMMO] + 28] = jjAnimations[jjAnimSets[ANIM::CUSTOM[0]] + 0];
  8.        
  9.         jjObjectPresets[OBJECT::ICEBULLET].special = jjObjectPresets[OBJECT::ICEBULLET].determineCurAnim(ANIM::AMMO, 8);
  10.         jjObjectPresets[OBJECT::ICEBULLET].behavior = BubbleGun;
  11.         jjObjectPresets[OBJECT::ICEBULLET].xSpeed = 1.5;
  12.         jjObjectPresets[OBJECT::ICEBULLET].counterEnd = 105;
  13.         jjObjectPresets[OBJECT::ICEBULLET].var[6] = 0;
  14.         jjObjectPresets[OBJECT::ICEBULLET].freeze = 0;
  15.         jjObjectPresets[OBJECT::ICEBULLET].lightType = jjObjectPresets[OBJECT::BLASTERBULLET].lightType;
  16.  
  17.         jjObjectPresets[OBJECT::ICEBULLETPU].special = jjObjectPresets[OBJECT::ICEBULLETPU].determineCurAnim(ANIM::CUSTOM[0], 0);
  18.         jjObjectPresets[OBJECT::ICEBULLETPU].behavior = BubbleGunPU;
  19.         jjObjectPresets[OBJECT::ICEBULLETPU].xSpeed = 2;
  20.         jjObjectPresets[OBJECT::ICEBULLETPU].counterEnd = 105;
  21.         jjObjectPresets[OBJECT::ICEBULLETPU].var[6] = 0;
  22.         jjObjectPresets[OBJECT::ICEBULLETPU].freeze = 0;
  23.         jjObjectPresets[OBJECT::ICEBULLETPU].lightType = jjObjectPresets[OBJECT::BLASTERBULLET].lightType;
  24.        
  25.         jjObjectPresets[OBJECT::ICEPOWERUP].determineCurAnim(ANIM::CUSTOM[1], 0, true);
  26.        
  27.         jjWeapons[WEAPON::ICE].spread = SPREAD::NORMAL;
  28.         jjWeapons[WEAPON::ICE].defaultSample = false;
  29.        
  30.         jjUseLayer8Speeds = true;
  31.         jjTexturedBGTexture = TEXTURE::WISETYNESS;
  32. }
  33.  
  34. void BubbleGun(jjOBJ@ bubble) {
  35.     if (bubble.state == STATE::START) {
  36.                 bubble.state = STATE::FLY;
  37.                 jjSample(bubble.xPos, bubble.yPos, SOUND::COMMON_PLOP2, 0, 0);
  38.         }
  39.        
  40.         if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
  41.                 jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT, 0, 0);
  42.         }
  43.        
  44.         bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
  45.         bubble.killAnim = jjObjectPresets[OBJECT::WATERSHIELDBULLET].killAnim;
  46. }
  47.  
  48. void BubbleGunPU(jjOBJ@ bubble) {
  49.         if (bubble.state == STATE::START) {
  50.                 bubble.state = STATE::FLY;
  51.                 jjSample(bubble.xPos, bubble.yPos, SOUND::COMMON_PLOP2, 0, 0);
  52.         }
  53.  
  54.         if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
  55.                 jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT, 0, 0);
  56.         }
  57.        
  58.         bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
  59.        
  60.         if (bubble.state == STATE::FLY && bubble.counter > 0) {
  61.                 switch (bubble.direction) {
  62.                         case 1: bubble.xSpeed = bubble.xSpeed - 0.1; bubble.ySpeed = bubble.ySpeed - 0.08; break;
  63.                         case -1: bubble.xSpeed = bubble.xSpeed + 0.1; bubble.ySpeed = bubble.ySpeed - 0.08; break;
  64.                 }
  65.         }
  66.        
  67.         bubble.killAnim = jjObjectPresets[OBJECT::WATERSHIELDBULLET].killAnim;
  68. }