The Abyss || Platformer || Entry                             #games #all #platformer #art #koala1306

Instructions: Omg this is not the same as grotto!!!! I got inspo from that game, buts its NOT THE SAME!\n20 levels\n ›CONTROLS‹\n›Normal controls to move\n›Avoid lava and gaps\n›Moving platforms \n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Slow, Calm, Soothing Instrumental - Easy Listening, Study, Relax Music - relaxdaily N060 v] until done\nend\n\nwhen flag clicked\nforever\n    set [pan left/right v] effect to (pick random (-100) to (100))\nend\n\n@GroundVis\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [groundvis v])\n    set [level v] to ([costume # v] of [groundvis v])\nend\n\n@Guy \n\nwhen flag clicked\nbroadcast (Green Flag clicked v)\n\nwhen I receive [green flag clicked v]\nReset Level\nTick\n\ndefine Controls - Left and Right\nset [speed x v] to ((speed x) * (0.7))\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [speed x v] by (-1.5)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [speed x v] by (1.5)\nend\n\ndefine Walk (direction) (speed) max steep (max steep)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (8))\nset [slope v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope) = (max steep)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope) = (max steep)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max steep (max steep)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    else\n        if <<<key (w v) pressed?> and <([abs v] of (speed) ) > [3.5]>> and <(touch) > [1]>> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        else\n            set [speed x v] to [0]\n        end\n    end\nend\n\ndefine Controls - Jump, Crouch\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n    set [in platforrm v] to [2]\nend\nif <(Orb up) = [Yes]> then\n    set [speed y v] to [10]\nend\n\ndefine Gravity\nif <<(speed y) < [4]> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Get Touching <check platform?>\nif <<<touching (ground v)?> or <touching (hidden v)?>> or <touching (moving v)?>> then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <touching (platforms v)?>> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\ndefine Reset Level\nset size to (30) %\nset rotation style [left-right v]\ngo to x: (item (Level) of [reset point x v]) y: (item (Level) of [reset point y v])\nreset timer\nshow\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [wall jump v] to [0]\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (idle v)\n    else\n        switch costume to ([floor v] of ((4) + ((frame) mod (5))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (jump v)\n    else\n        switch costume to (jump2 v)\n    end\nend\n\nwhen I receive [next level v]\nswitch costume to (idle v)\nset x to (-222)\n\nwhen I receive [yay! v]\nReset Level\nhide\n\ndefine Smooth Glide To X: (x) (speed) After x: (after x)\nrepeat ((speed) * ((speed) / ((speed) / (5))))\n    change x by (((x) / (speed)) - ((x position) / (speed)))\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\nend\nset x to (after x)\n\ndefine Tick\nforever\n    if <<touching (spikes v)?> or <touching (lava v)?>> then\n        Reset Level\n        broadcast (Death v)\n    end\n    switch costume to (hitbox v)\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(y position) < [-170]> then\n        Reset Level\n    end\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        Controls - Left and Right\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (90) (speed x) max steep (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (-90) (speed x) max steep (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    Set Costume\n    broadcast (tick v) and wait\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <touching (moving v)?> then\n        set x to (round ([x position v] of [moving v]))\n    end\n    if <<(x position) > [230]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\nend\n\nadd (x position) to [reset point x v]\nadd (y position) to [reset point y v]\n\nforever\n\ndefine Smooth glide to y: (y) (speed) \nrepeat ((speed) * ((speed) / ((speed) / (5))))\n    change y by (((y) / (speed)) - ((y position) / (speed)))\nend\n\nCheck Hit Ceiling / Floor <(speed y) > [0]>\nGravity\n\nadd (x position) to [reset point x v]\nadd (y position) to [reset point y v]\n\nif <(backdrop [number v]) = [1]> then\n    set [brightness v] effect to (100)\nelse\n    set [brightness v] effect to (0)\nend\nif <<(Level) = [6]> and <touching (_edge_ v)?>> then\n    if <(y position) < [-150]> then\n        broadcast (Under level v)\n        Smooth glide to y: [150] [20] \n    end\nend\nif <<(Level) = [7]> and <touching (_edge_ v)?>> then\n    if <(y position) > [150]> then\n        broadcast (Upper level v)\n        Smooth glide to y: [-100] [20] \n    end\nend\n\nSmooth Glide To X: [-222] [15] After x: [-222]\nTick\n\nstop [other scripts in sprite v]\n\nwhen [p v] key pressed\nadd (x position) to [reset point x v]\nadd (y position) to [reset point y v]\n\n@Moving\n\ndefine Smooth Glide To X: (x) (speed)\nrepeat ((speed) * ((speed) / ((speed) / (2))))\n    change x by (((x) / (speed)) - ((x position) / (speed)))\nend\n\ndefine Smooth glide to y: (y) (speed) \nrepeat ((speed) * ((speed) / ((speed) / (5))))\n    change y by (((y) / (speed)) - ((y position) / (speed)))\nend\n\ndefine Lvl: (lvl) Glide to x: (x) Glide to y: (y) Pos 1 x: (x1) Pos 1 y: (y1) (speed) :speed\ngo to x: (x) y: (y)\nif <(Level) = (lvl)> then\n    show\n    forever\n        Smooth Glide To X: (x1) Y: (y1) at Speed: (speed)\n        wait (0.5) seconds\n        Smooth Glide To X: (x) Y: (y) at Speed: (speed)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\ndefine Smooth Glide To X: (x) Y: (y) at Speed: (speed)\nrepeat ((speed) * ((speed) / ((speed) / (5))))\n    change x by (((x) / (speed)) - ((x position) / (speed)))\n    change y by (((y) / (speed)) - ((y position) / (speed)))\nend\n\nwhen I receive [reset v]\nhide\ngo to x: (-20) y: (-90)\nLvl: [6] Glide to x: [-25] Glide to y: [-150] Pos 1 x: [145] Pos 1 y: [-150] [40] :speed\nLvl: [17] Glide to x: [-115] Glide to y: [-145] Pos 1 x: [-20] Pos 1 y: [55] [50] :speed\nLvl: [19] Glide to x: [-100] Glide to y: [-80] Pos 1 x: [100] Pos 1 y: [-80] [20] :speed\n\nwhen I receive [next level v]\nwait (0.000001) seconds\nbroadcast (Reset v)\n\n@Torch\n\nwhen I receive [win game v]\nhide\n\ndefine Set\ngo to (guy  v)\n\nwhen flag clicked\nshow\nswitch costume to (light v)\ngo to [front v] layer\nset [ghost v] effect to (0)\nforever\n    Set\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    switch costume to (light v)\n    set size to ((60) + ((3) * ([sin v] of ((timer) * (100)) ))) %\n    switch costume to (light v)\nend\n\nset size to (20) %\n\n@BgTorch\n\nwhen flag clicked\nforever\n    go to (guy  v)\n    go to [front v] layer\n    show\nend\n\n@Lava\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\nshow\n\n@Particles\n\nwhen flag clicked\nhide\nforever\n    wait (0.05) seconds\n    repeat (pick random (3) to (8))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (10) to (100))\ngo to x: (pick random (-500) to (500)) y: (250)\nset size to (20) %\nrepeat until <(y position) < [-150]>\n    change y by (pick random (-5) to (-10))\nend\ndelete this clone\n\n@Win/Portal\n\nwhen flag clicked\nhide\nforever\n    set size to ((75) + ((5) * ([sin v] of ((timer) * (150)) ))) %\nend\n\nwhen I receive [reset v]\nif <(Level) = [21]> then\n    show\n    switch costume to (costume1 v)\n    forever\n        if <touching (guy  v)?> then\n            stop [other scripts in sprite v]\n            repeat (80)\n                go to [front v] layer\n                switch costume to (costume2 v)\n                change size by (10)\n            end\n            stop [all v]\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [timer v] to ((timer) + (0.1))\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (-10000) y: (-10000)\n    switch costume to (filler v)\n    set size to (150) %\n    switch costume to (costume1 v)\nend\n\nwhen [timer v] > (timer)\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (-10000) y: (-10000)\nswitch costume to (filler v)\nset size to (150) %\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    change [ghost v] effect by (-5)\n    change x by (((0) - (x position)) / (5))\n    change y by (((0) - (y position)) / (5))\n    switch costume to (filler v)\n    change size by (((100) - (size)) / (15))\n    switch costume to (costume2 v)\nend\n\n