Downloads containing gauntlet.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: Gauntlet DanZeal Capture the flag 7.6 Download file

File preview

  1. void UnsinkablePickup(jjOBJ@ obj) {
  2.         if (obj.yPos > 47*32) obj.yPos = 46.5*32;
  3.         obj.behave(BEHAVIOR::PICKUP);
  4. }
  5.  
  6. void StillPickup(jjOBJ@ obj) {
  7.         if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT;
  8.         obj.behave(BEHAVIOR::PICKUP);
  9. }
  10.  
  11. void onLevelLoad() {
  12.         jjObjectPresets[OBJECT::FULLENERGY].behavior = UnsinkablePickup;       
  13.         jjObjectPresets[OBJECT::CARROT].behavior = StillPickup;
  14.        
  15.         /***********************************************************/
  16.         /*********** Copying the tilemap onto junk tiles ***********/
  17.         /***********************************************************/
  18.        
  19.         //Copy contents of tiles 36 and 944 onto pixel maps
  20.         jjPIXELMAP SlopedGirderTop(36);
  21.         jjPIXELMAP SlopedGirderBottom(944);
  22.        
  23.         //Color the areas-to-be-masked of the problematic tiles with solid red
  24.         //for (uint x = 16; x < 32; ++x) {
  25.         //      for (uint y = 16; y < 32; ++y) {
  26.         //              SlopedGirderTop[x,y] = 24;
  27.         //      }
  28.         //      for (uint y = 0; y < 16; ++y) {
  29.         //              SlopedGirderBottom[x,y] = 24;
  30.         //      }
  31.         //}
  32.        
  33.         //Paste the edited pixel maps onto junk tiles
  34.         SlopedGirderTop.save(966, true);       
  35.         SlopedGirderBottom.save(976, true);
  36.        
  37.        
  38.                
  39.         /***********************************************************/
  40.         /*** Filling the problematic corners of the copied tiles ***/
  41.         /***********************************************************/
  42.        
  43.         //Copy masks of tiles 36 and 944 onto pixel maps
  44.         jjMASKMAP SlopedGirderTopMask(36);
  45.         jjMASKMAP SlopedGirderBottomMask(944);
  46.  
  47.         //Filling the problematic corners of the copied tiles
  48.         for (uint x = 16; x < 32; ++x) {
  49.                 for (uint y = 16; y < 32; ++y) {
  50.                         SlopedGirderTopMask[x,y] = true;
  51.                 }
  52.                 for (uint y = 0; y < 16; ++y) {
  53.                         SlopedGirderBottomMask[x,y] = true;
  54.                 }
  55.         }
  56.        
  57.         //Paste the edited mask maps onto tiles 966 and 976
  58.         SlopedGirderTopMask.save(966, true);
  59.         SlopedGirderBottomMask.save(976, true);
  60. }