void UnsinkablePickup(jjOBJ@ obj) { if (obj.yPos > 47*32) obj.yPos = 46.5*32; obj.behave(BEHAVIOR::PICKUP); } void StillPickup(jjOBJ@ obj) { if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT; obj.behave(BEHAVIOR::PICKUP); } void onLevelLoad() { jjObjectPresets[OBJECT::FULLENERGY].behavior = UnsinkablePickup; jjObjectPresets[OBJECT::CARROT].behavior = StillPickup; /***********************************************************/ /*********** Copying the tilemap onto junk tiles ***********/ /***********************************************************/ //Copy contents of tiles 36 and 944 onto pixel maps jjPIXELMAP SlopedGirderTop(36); jjPIXELMAP SlopedGirderBottom(944); //Color the areas-to-be-masked of the problematic tiles with solid red //for (uint x = 16; x < 32; ++x) { // for (uint y = 16; y < 32; ++y) { // SlopedGirderTop[x,y] = 24; // } // for (uint y = 0; y < 16; ++y) { // SlopedGirderBottom[x,y] = 24; // } //} //Paste the edited pixel maps onto junk tiles SlopedGirderTop.save(966, true); SlopedGirderBottom.save(976, true); /***********************************************************/ /*** Filling the problematic corners of the copied tiles ***/ /***********************************************************/ //Copy masks of tiles 36 and 944 onto pixel maps jjMASKMAP SlopedGirderTopMask(36); jjMASKMAP SlopedGirderBottomMask(944); //Filling the problematic corners of the copied tiles for (uint x = 16; x < 32; ++x) { for (uint y = 16; y < 32; ++y) { SlopedGirderTopMask[x,y] = true; } for (uint y = 0; y < 16; ++y) { SlopedGirderBottomMask[x,y] = true; } } //Paste the edited mask maps onto tiles 966 and 976 SlopedGirderTopMask.save(966, true); SlopedGirderBottomMask.save(976, true); }