Downloads containing ezDaybreak.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 17 Levels Jazz2Online Multiple N/A Download file
JJ2+ Only: DaybreakFeatured Download Ragnarok! Capture the flag 8.5 Download file

File preview

  1. const uint8 EXTRAAMMOPIECES = 3;
  2. const int VANISHTIME = 560; //8 seconds
  3. jjOBJ@ extrapiece;
  4.  
  5. void onLevelLoad() {
  6.         jjTexturedBGTexture = TEXTURE::PSYCH;
  7.        
  8.         jjObjectPresets[OBJECT::ICEAMMO15].behavior = ExtraAmmoFrom15Crate;
  9.         jjObjectPresets[OBJECT::TOASTERAMMO15].behavior = ExtraAmmoFrom15Crate;
  10.         jjObjectPresets[OBJECT::FULLENERGY].behavior = StillPickup;
  11.        
  12.         jjObjectPresets[OBJECT::ICEAMMO15].var[2] = OBJECT::GUN8AMMO3;
  13. }
  14.  
  15. void ExtraAmmoFrom15Crate(jjOBJ@ obj) {
  16.         if (obj.state == STATE::START) {
  17.                 obj.doesHurt = EXTRAAMMOPIECES;
  18.                 obj.var[10] = obj.var[2];
  19.         }      
  20.         if (obj.state == STATE::ACTION) {
  21.                 while (obj.doesHurt > 0) {
  22.                         @extrapiece = jjObjects[jjAddObject(obj.var[10], obj.xPos + jjRandom()%24, obj.yPos)];
  23.                         extrapiece.behavior = BEHAVIOR::FLICKERGEM;
  24.                         extrapiece.counter = VANISHTIME;
  25.                         extrapiece.state = STATE::FLOATFALL;
  26.                        
  27.                         obj.doesHurt--;
  28.                 }
  29.         }
  30.         if (obj.eventID == OBJECT::ICEAMMO15) {
  31.                 obj.behave(BEHAVIOR::AMMO15, false);
  32.                 jjDrawTile(int(obj.xPos) - 12, int(obj.yPos) - 19, 628);
  33.         }
  34.         else obj.behave(BEHAVIOR::AMMO15);
  35. }
  36.  
  37. void StillPickup(jjOBJ@ obj) {
  38.         if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT;
  39.         obj.behave(BEHAVIOR::PICKUP);
  40. }