/* Enemy Waves (Ground): Small: Lilypod with 4 frogs on it, firing aimed bullets Lilypad with a COOL frog firing spirals Large: Hut when destroyed releases 6 frog enemies that fly upwards and start moving towards the player Enemy Waves (Flying): Small: 3 lines of small fairies firing aimed bullets Horizontal wave of fairies firing aimed fans, followed by horizontal wave firing aimed rings Fairies coming from both sides, firing falling bullet lines 2 tightly-knit lines of small fairies firing aimed fans, alongside a large fairy firing rings Large: Two fairies firing line-rings, one following the other One giant fairy on spaceship firing aimed line-fans and light rings 2 giant fairies firing aimed line fans only, one following the other */ int smallEnemyHitbox = 75; int largeEnemyHitbox = 110; int popcornHitbox = 75; float smallEnemyHP = 50; float largeEnemyHP = 240; float largeEnemyAltHP = 180; float popcornHP = 50; float smallEnemyScale = 0.7; float largeEnemyScale = 1; float popcornScale = 0.7; function CreateFan (int parent, int way, int graphic, int stack, float ang, float angspace, float spd1, float spd2, float scaleBullet, int type, bool reflect){ int objPattern = ObjPatternShot_Create(); ObjPatternShot_SetParentObject(objPattern, parent); //if(ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID(), INFO_CURRENT_LIFE) == 0){Obj_Delete(objPattern); return;} ObjPatternShot_SetPatternType(objPattern, type); // PATTERN_FAN or PATTERN_FAN_AIMED ObjPatternShot_SetShotType(objPattern, OBJ_SHOT); ObjPatternShot_SetInitialBlendMode(objPattern, BLEND_ALPHA); ObjPatternShot_SetShotCount(objPattern, way, stack); ObjPatternShot_SetSpeed(objPattern, spd1, spd2); ObjPatternShot_SetAngle(objPattern, ang, angspace); ObjPatternShot_SetBasePointOffset(objPattern, 0, 0); //ObjPatternShot_SetDelay(objPattern, 15); ObjPatternShot_SetGraphic(objPattern, graphic); //Shoot2; let arrayPattern = ObjPatternShot_FireReturn(objPattern); ascent(i in -1..length(arrayPattern)-1){ _BulletRescale(arrayPattern[i], scaleBullet, true, 1); _Delay(arrayPattern[i], 10); //Obj_SetRenderPriorityI(arrayPattern[i], 51); } async{ wait(300); Obj_Delete(objPattern); return; } return objPattern; } // Overload function CreateFan (int parent, int way, int graphic, int stack, float ang, float angspace, float spd1, float spd2, float scaleBullet, float xOffset, float yOffset, int type, bool reflect){ int objPattern = ObjPatternShot_Create(); ObjPatternShot_SetParentObject(objPattern, parent); //if(ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID(), INFO_CURRENT_LIFE) == 0){Obj_Delete(objPattern); return;} ObjPatternShot_SetPatternType(objPattern, type); // PATTERN_FAN or PATTERN_FAN_AIMED ObjPatternShot_SetShotType(objPattern, OBJ_SHOT); ObjPatternShot_SetInitialBlendMode(objPattern, BLEND_ALPHA); ObjPatternShot_SetShotCount(objPattern, way, stack); ObjPatternShot_SetSpeed(objPattern, spd1, spd2); ObjPatternShot_SetAngle(objPattern, ang, angspace); ObjPatternShot_SetBasePointOffset(objPattern, xOffset, yOffset); //ObjPatternShot_SetDelay(objPattern, 15); ObjPatternShot_SetGraphic(objPattern, graphic); //Shoot2; let arrayPattern = ObjPatternShot_FireReturn(objPattern); ascent(i in -1..length(arrayPattern)-1){ _BulletRescale(arrayPattern[i], scaleBullet, true, 1); _Delay(arrayPattern[i], 10); //Obj_SetRenderPriorityI(arrayPattern[i], 51); } async{ wait(300); Obj_Delete(objPattern); return; } return objPattern; } task _SmallFairyFallingLine( int renderPriority, float enmX, enmY, spdMove, angMove, int graphicBullet, int numLine, float maxspeedBullet, float delayLine, float delayBullet, float scaleBullet ){ // Spawns enemy. int enm = _CreateEnemy( enmX, enmY, enmX, enmY, 5, smallEnemyScale, smallEnemyScale, smallEnemyHP, smallEnemyHitbox, 0, texEnm, 768, 0, 1024, 256); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, spdMove); ObjMove_SetAngle(enm, angMove); ObjEnemy_SetDamageRate(enm, 0, 0); wait(5); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetX(enm) < STG_WIDTH && ObjMove_GetX(enm) > 0){ loop(numLine){ int bullet = CreateShotA2(ObjMove_GetX(enm), ObjMove_GetY(enm), 0, 90, maxspeedBullet/30, maxspeedBullet, graphicBullet, 10); _BulletRescale(bullet, scaleBullet, true, 1); _Delay(bullet, 10); if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);} else{ Shoot1; } wait(delayBullet); } wait(delayLine); } else{yield;} } } _EnemyItemDrop( enm, true, 5, 3, 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); } task _SmallFairyAimedFan( int renderPriority, float enmX, float enmY, float spdMove, float angMove, int graphicBullet, float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet ){ // Spawns enemy. int enm = _CreateEnemy( enmX, enmY, enmX, enmY, 5, smallEnemyScale, smallEnemyScale, smallEnemyHP, smallEnemyHitbox, 0, texEnm, 256, 0, 512, 256); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, spdMove); ObjMove_SetAngle(enm, angMove); ObjEnemy_SetDamageRate(enm, 0, 0); wait(5); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/9){ int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan, 0, angspaceFan, speedFan1, speedFan2, scaleBullet, PATTERN_FAN_AIMED, false); if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);} else{ Shoot1; } wait(delayFan); } else{yield;} } } _EnemyItemDrop( enm, true, 5, 3, 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); } task _SmallFairyRing( int renderPriority, int graphicBullet, float enmX, enmY, int denseRing, float delayRing, float speedRing, float spdMove, angMove, scaleBullet ){ // Spawns enemy. int enm = _CreateEnemy( enmX, enmY, enmX, enmY, 5, smallEnemyScale, smallEnemyScale, smallEnemyHP, smallEnemyHitbox, 0, texEnm, 768, 0, 1024, 256); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, spdMove); ObjMove_SetAngle(enm, angMove); ObjEnemy_SetDamageRate(enm, 0, 0); wait(5); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetX(enm) < STG_WIDTH && ObjMove_GetX(enm) > 0){ ascent(i in -1..denseRing){ int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, GetAngleToPlayer(enm)+i*360/denseRing, graphicBullet, 10); _BulletRescale(bullet, scaleBullet, true, 1); _Delay(bullet, 10); if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);} else{ Shoot1; } } wait(delayRing); } else{yield;} } } _EnemyItemDrop( enm, true, 5, 3, 10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1, 120, smallEnemyHitbox*2 ); } task _CreateFrog( int renderPriority, int[] rect, int graphicBullet, float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float frogX, frogY, speedMoveFrog, scaleBullet ){ int enm = _CreateEnemy( frogX, frogY, frogX, frogY, 5, popcornScale, popcornScale, popcornHP, popcornHitbox, 0, texEnm, rect[0], rect[1], rect[2], rect[3]); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, speedMoveFrog); ObjMove_SetAngle(enm, 90); ObjEnemy_SetDamageRate(enm, 0, 0); wait(15); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/9){ int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan, 0, angspaceFan, speedFan1, speedFan2, scaleBullet, PATTERN_FAN_AIMED, false); if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);} else{Shoot2;} wait(delayFan); } else{yield;} } } _EnemyItemDrop( enm, false, 4, 8, 7+round((GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), 15+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 120, popcornHitbox*2 ); } task _CreateKingFrog( int renderPriority, int[] rect, int graphicBullet, float angSpiral, float delaySpiral, float speedSpiral, float frogX, frogY, speedMoveFrog, scaleBullet ){ int enm = _CreateEnemy( frogX, frogY, frogX, frogY, 5, largeEnemyScale, largeEnemyScale, largeEnemyHP, largeEnemyHitbox, 0, texEnm, rect[0], rect[1], rect[2], rect[3]); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, speedMoveFrog); ObjMove_SetAngle(enm, 90); ObjEnemy_SetDamageRate(enm, 0, 0); async{ if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){ int sigil = _Create2DImage(texEnm, [0, 1024, 512, 1536]); ObjRender_SetAlpha(sigil, 240); Obj_SetRenderPriorityI(sigil, Obj_GetRenderPriorityI(enm)-1); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ ObjRender_SetPosition(sigil, ObjMove_GetX(enm), ObjMove_GetY(enm), 1); ObjRender_SetAngleZ(sigil, ObjRender_GetAngleZ(sigil)+3); yield; } Obj_Delete(sigil); } } async{ float x, y; wait(60); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ x = ObjMove_GetX(enm); y = ObjMove_GetY(enm); yield; } DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 384); ObjSound_Play(bossBoom); if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);} TExplosionA(x, y, 10, 0.5); } wait(60); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){ SpawnSpiral(0, 1); wait(delaySpiral * 360/angSpiral); } else{yield;} } } task SpawnSpiral(float angStart, int spinDir){ async{ ascent(i in -1..360/angSpiral){ int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+i*spinDir*angSpiral, graphicBullet, 10); int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+(180+angStart)-i*spinDir*angSpiral, graphicBullet, 10); if(Obj_IsDeleted(enm)){Obj_Delete(bullet); Obj_Delete(bullet2); break;} else{ Shoot2; _BulletRescale(bullet, scaleBullet, true, 1); _BulletRescale(bullet2, scaleBullet, true, 1); _Delay(bullet, 10); _Delay(bullet2, 10); } wait(delaySpiral); } } async{ ascent(i in -1..360/angSpiral){ int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+i*-spinDir*angSpiral, graphicBullet, 10); int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+(180+angStart)-i*-spinDir*angSpiral, graphicBullet, 10); if(Obj_IsDeleted(enm)){Obj_Delete(bullet); Obj_Delete(bullet2); break;} else{ Shoot2; _BulletRescale(bullet, scaleBullet, true, 1); _BulletRescale(bullet2, scaleBullet, true, 1); _Delay(bullet, 10); _Delay(bullet2, 10); } wait(delaySpiral); } } } _EnemyItemDrop( enm, false, 8, 14, round(15+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2), 180, largeEnemyHitbox*2.5 ); //ObjEnemy_SetDamageRate(enm, 100, 150); } task _LilypodWithKingFrog( int renderFrog, int graphicBullet, float lilyX, float lilyY, float angSpiral, float delaySpiral, float speedSpiral, float scaleBullet, float speedMove ){ float offsetX = 80; float offsetY = 70; int lilypad = _CreateEnemy( false, lilyX, lilyY, lilyX, lilyY, 5, 1, 1, 999, 0, 0, texEnm, 1536, 256, 2048, 768); Obj_SetRenderPriorityI(lilypad, renderFrog-4); ObjMove_SetSpeed(lilypad, speedMove); ObjMove_SetAngle(lilypad, 90); ObjEnemy_SetDamageRate(lilypad, 0, 0); wait(15); ObjEnemy_SetAutoDelete(lilypad, true); async{ _CreateKingFrog( renderFrog, [1024, 768, 1280, 1024], graphicBullet, angSpiral, delaySpiral, speedSpiral, lilyX, lilyY, speedMove, scaleBullet ); } } task _LilypodWith4Frogs( int renderFrog, int graphicBullet, float lilyX, float lilyY, float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet, float speedMove ){ float offsetX = 80; float offsetY = 70; int lilypad = _CreateEnemy( false, lilyX, lilyY, lilyX, lilyY, 5, 1, 1, 999, 0, 0, texEnm, 1536, 256, 2048, 768); Obj_SetRenderPriorityI(lilypad, renderFrog-4); ObjMove_SetSpeed(lilypad, speedMove); ObjMove_SetAngle(lilypad, 90); ObjEnemy_SetDamageRate(lilypad, 0, 0); wait(5); ObjEnemy_SetAutoDelete(lilypad, true); async{ _CreateFrog( renderFrog, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX+offsetX, lilyY+offsetY, speedMove, scaleBullet ); _CreateFrog( renderFrog, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX-offsetX, lilyY+offsetY, speedMove, scaleBullet ); _CreateFrog( renderFrog-1, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX+offsetX, lilyY-offsetY, speedMove, scaleBullet ); _CreateFrog( renderFrog-1, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX-offsetX, lilyY-offsetY, speedMove, scaleBullet ); } } task _LilypodWith2Frog( int renderFrog, int graphicBullet, float lilyX, float lilyY, float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet, float speedMove ){ int lilypad = _CreateEnemy( false, lilyX, lilyY, lilyX, lilyY, 5, 0.75, 0.75, 999, 0, 0, texEnm, 1536, 256, 2048, 768); Obj_SetRenderPriorityI(lilypad, renderFrog-4); ObjMove_SetSpeed(lilypad, speedMove); ObjMove_SetAngle(lilypad, 90); ObjEnemy_SetDamageRate(lilypad, 0, 0); wait(5); ObjEnemy_SetAutoDelete(lilypad, true); async{ _CreateFrog( renderFrog, [1280, 512, 1536, 768], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX-60, lilyY, speedMove, scaleBullet ); _CreateFrog( renderFrog, [1280, 512, 1536, 768], graphicBullet, angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan, lilyX+60, lilyY, speedMove, scaleBullet ); } } // Leave this for the boss. task _CreateRybbShip( int renderShip, int graphicBullet, float shipX, shipY, float speedRing, speedLine, int delayLine, delayRing, angleRing, denseLine, delayBullet, float scaleBullet, float speedMove ){ int ship = _CreateEnemy( false, shipX, shipY, shipX, shipY, 5, 1, 1, 999, 0, 0, texEnm, 1280, 1024, 2048, 1536); Obj_SetRenderPriorityI(ship, renderShip-1); ObjMove_SetSpeed(ship, speedMove); ObjMove_SetAngle(ship, 90); ObjEnemy_SetDamageRate(ship, 0, 0); wait(15); ObjEnemy_SetAutoDelete(ship, true); // Create enemy async{ int enm = _CreateEnemy( shipX, shipY, shipX, shipY, 5, largeEnemyScale, largeEnemyScale, largeEnemyHP, largeEnemyHitbox, 0, texEnm, 0, 256, 256, 512); Obj_SetRenderPriorityI(enm, renderShip); ObjEnemy_SetDamageRate(enm, 0, 0); wait(15); ObjEnemy_SetAutoDelete(enm, true); async{ float x, y, curxShip, curyShip; while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0 && !Obj_IsDeleted(ship)){ x = ObjMove_GetX(enm); y = ObjMove_GetY(enm); curxShip = ObjMove_GetX(ship); curyShip = ObjMove_GetY(ship); ObjMove_SetPosition(enm, curxShip, curyShip-128); yield; } DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 512); } async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){ ascent(i in -1..360/angleRing){ int bullet = CreateShotA1(ObjMove_GetX(enm)+rand(-45, 45), ObjMove_GetY(enm)+rand(-30, 30), speedRing, GetAngleToPlayer(enm)+i*angleRing, graphicBullet, 10); if(Obj_IsDeleted(enm)){Obj_Delete(bullet); break;} else{ Shoot1; _BulletRescale(bullet, scaleBullet, true, 1); _Delay(bullet, 10); } } wait(delayRing); } else{yield;} } } _EnemyItemDrop( enm, true, 6, 10, round(9+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.1), round(16+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.4), 180, largeEnemyHitbox*2.5 ); } } // VARIABLES task _LargeFairyAimedFan( int renderPriority, bool checkBomb, float enmX, float enmY, float spdMove, float angMove, int graphicBullet, float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet ){ // Spawns enemy. int enm = _CreateEnemy( enmX, enmY, enmX, enmY, 5, largeEnemyScale, largeEnemyScale, largeEnemyAltHP, largeEnemyHitbox, 0, texEnm, 0, 256, 256, 512); Obj_SetRenderPriorityI(enm, renderPriority); ObjMove_SetSpeed(enm, spdMove); ObjMove_SetAngle(enm, angMove); ObjEnemy_SetDamageRate(enm, 0, 0); async{ if(checkBomb && GetCommonData("Flying Loops Cleared", 0) % 4 == 0 && GetCommonData("Flying Loops Cleared", 0) != 0){ int sigil = _Create2DImage(texEnm, [0, 1024, 512, 1536]); ObjRender_SetAlpha(sigil, 240); Obj_SetRenderPriorityI(sigil, Obj_GetRenderPriorityI(enm)-1); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ ObjRender_SetPosition(sigil, ObjMove_GetX(enm), ObjMove_GetY(enm), 1); ObjRender_SetAngleZ(sigil, ObjRender_GetAngleZ(sigil)+3); yield; } Obj_Delete(sigil); } } async{ float x = 0, y = 0; wait(max(10, 30-GetCommonData("Rank", 0)*5)); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ x = ObjMove_GetX(enm); y = ObjMove_GetY(enm); yield; } DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 256); ObjSound_Play(bossBoom); if(checkBomb){if(GetCommonData("Flying Loops Cleared", 0) % 4 == 0 && GetCommonData("Flying Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);}} TExplosionA(x, y, 10, 0.5); } wait(max(10, 30-GetCommonData("Rank", 0)*5)); ObjEnemy_SetAutoDelete(enm, true); async{ wait(5); while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){ if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/10){ int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan, 0, angspaceFan, speedFan1, speedFan2, scaleBullet, PATTERN_FAN_AIMED, false); if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);} else{ Shoot1; } wait(delayFan); } else{yield;} } } _EnemyItemDrop( enm, true, 15, 6, round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2.25), round(12+(GetCommonDataPtr(RANK_PTR, 1)-1)*2), 180, largeEnemyHitbox*2 ); //ObjEnemy_SetDamageRate(enm, 100, 150); } task _WaitForAutoDelete(int shot, int timeWait){ ObjShot_SetAutoDelete(shot, false); wait(timeWait); ObjShot_SetAutoDelete(shot, true); }