Notebook 2 | Platformer #Games

Instructions: -Announcment ： Part 3 has been delayed because I am currently making another game. \nScroll down for tips\nPlay part 1 if you haven't: https://scratch.mit.edu/projects/478660514/\n⚠ Epilepsy Warning\nDON'T SKIP LEVEL 2, it will glitch\nI know, it's hard, mainly to make up for how short it is.\nPlease don't spam "generic" or that kind of stuff(I will  report you!), this isn't generic at all.\nAnd don't forget to leave a love\n\nBlocks: 900+\nTIPS:\nToo hard? Play here: https://turbowarp.org/489342260/fullscreen?size=800x360\nToo easy? Play here:\nhttps://turbowarp.org/489342260/fullscreen?size=500x5000\nAnd last of all, don't skip level 2 or it will glitch(I know I said that already)\n#games #all #platformer #wait #you #are #reading #the #tags #lol #more #tags #in #the #notes #and #credits

@Stage\n\n@Player\n\ndefine Amazing Platformer Engine\nchange y by (-2)\nif <touching color (#53c9ff)?> then\n    change [xvel v] by ((<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> - <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>>) * (5))\nelse\n    change [xvel v] by ((<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> - <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>>) * (2))\nend\nchange y by (2)\nset [xvel v] to ((XVel) * (0.8))\nchange x by (XVel)\nchange x by (((0) - (XVel)) * <touching (ground v)?>)\nchange y by (-1)\nif <<<touching (ground v)?> or <touching (up orbs v)?>> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    set [yvel v] to [14]\nend\nif <<touching (water v)?> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    set [yvel v] to [5]\nend\nif <not <touching (water v)?>> then\n    change [yvel v] by (-1)\nelse\n    change [yvel v] by (-0.2)\nend\nchange y by ((YVel) + (1))\nif <touching (ground v)?> then\n    change y by ((0) - (YVel))\n    set [yvel v] to [0]\nend\nif <touching (portal v)?> then\n    if <not <(Level) = [9]>> then\n        Respawn\n        change [level v] by (1)\n        broadcast (Enemy Respawn v)\n    else\n        go to x: (-214) y: (0)\n        broadcast (Fade v)\n    end\nend\nif <<touching (right orbs v)?> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    set [xvel v] to [14]\nend\nif <<touching (right orbs v)?> and <key (space v) pressed?>> then\n    set [xvel v] to [20]\nend\nif <touching (bouncy v)?> then\n    set [yvel v] to [18]\nend\nif <<touching (water v)?> and <<key (s v) pressed?> or <<key (down arrow v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>>> then\n    set [yvel v] to [-5]\nend\nif <<<<touching (danger v)?> or <touching (moving danger v)?>> or <touching (cannon v)?>> or <<(y position) < [-170]> or <<<touching (enemy ai v)?> or <touching (cannon2 v)?>> or <<touching (saws v)?> or <touching (lasers v)?>>>>> then\n    set [resx v] to (x position)\n    set [resy v] to (y position)\n    Respawn\n    create clone of (_myself_ v)\n    broadcast (Enemy Respawn v)\nend\nif <<touching (down orbs v)?> and <<<key (w v) pressed?> or <key (space v) pressed?>> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    set [yvel v] to [-10]\nend\n\ndefine Respawn\ngo to x: (-214) y: (0)\nset [xvel v] to [0]\nset [yvel v] to [0]\n\nwhen flag clicked\nhide\nRespawn\nset [level v] to [1]\n\nwhen I receive [begin gameplay v]\nshow\nRespawn\nforever\n    Amazing Platformer Engine\nend\n\nwhen I start as a clone\ngo to x: (ResX) y: (ResY)\nrepeat (10)\n    turn right (60) degrees\n    change y by (5)\n    change [ghost v] effect by (10)\nend\nhide\nset [resx v] to [0]\nset [resy v] to [0]\ndelete this clone\n\nwhen I receive [help v]\nforever\n    change y by (-1)\n    if <<key (space v) pressed?> and <touching (ground v)?>> then\n        set [yvel v] to [18]\n    end\n    change y by (1)\n    if <<key (space v) pressed?> and <touching (up orbs v)?>> then\n        set [yvel v] to [18]\n    end\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Text and Decorations\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Story\n\nwhen flag clicked\nswitch costume to (alpha v)\nwait (5) seconds\nswitch costume to (1 v)\nshow\nrepeat (4)\n    wait until <mouse down?>\n    next costume\n    wait until <not <mouse down?>>\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Begin Gameplay v)\nhide\n\nwhen I receive [earth v]\nclear graphic effects\nswitch costume to (6 v)\nshow\nrepeat (4)\n    wait until <mouse down?>\n    next costume\n    wait until <not <mouse down?>>\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Portal\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Intro\n\ndefine Animate (x) (y) (size) (direction) (speed)\nchange x by (((round (x)) - (round (x position))) / (speed))\nchange y by (((round (y)) - (round (y position))) / (speed))\nchange size by (((round (size)) - (round (size))) / (speed))\nturn right (((round (direction)) - (round (direction))) / (speed)) degrees\n\ndefine Color (color) Brightness (brightness) Transparency (transparency)\nset [color v] to (color)\nset [brightness v] to (brightness)\nset [transparency v] to (transparency)\nset [color v] effect to (Color)\nset [brightness v] effect to (Brightness)\nset [ghost v] effect to (Transparency)\n\ndefine Size (size) (speed)\nchange size by (((round (size)) - (round (size))) / (speed))\n\nwhen flag clicked\nwait (0.25) seconds\nClone Sprite ID [Start] [1]\nwait (1.3) seconds\nClone Sprite ID [Cover] [1]\nwait (0.4) seconds\nClone Sprite ID [Logo] [1]\nClone Sprite ID [Particles] [50]\nwait (1) seconds\nset [xmot v] to [-200]\nrepeat (7)\n    Color [20] Brightness [0] Transparency [0]\n    set [id v] to [Bars2]\n    create clone of (_myself_ v)\n    change [xmot v] by (75)\n    wait (0.02) seconds\nend\nwait (0.2) seconds\nCreate Bars\nwait (0.15) seconds\nBouncy Bars\nwait (0.3) seconds\nClone Sprite ID [Fill] [1]\nwait (0.5) seconds\nClone Sprite ID [Text] [1]\nwait (1) seconds\nbroadcast (End Intro v)\n\nwhen I start as a clone\nif <(ID) = [Start]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] [0] [90] [1]\n    Color [20] Brightness [25] Transparency [0]\n    switch costume to (shape 1 v)\n    show\n    repeat until <[1200] = (round (size))>\n        switch costume to (size bypass v)\n        Size [1200] [5]\n        switch costume to (shape 1 v)\n    end\n    wait (2) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Cover]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] [0] [90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (shape 1 v)\n    show\n    repeat until <[325] = (round (size))>\n        switch costume to (size bypass v)\n        Size [325] [4]\n        switch costume to (shape 1 v)\n    end\n    wait (2.5) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Logo]> then\n    clear graphic effects\n    Animate [0] [-5000000] [0] [90] [1]\n    Color [0] Brightness [0] Transparency [0]\n    switch costume to (logo v)\n    show\n    repeat until <([abs v] of (((Move) * (0.7)) + (((100) - (round (size))) * (0.3))) ) < [0.05]>\n        set [move v] to (((Move) * (0.7)) + (((100) - (round (size))) * (0.3)))\n        set [ghost v] effect to (Move)\n        change size by (Move)\n        set y to (Move)\n    end\n    wait (2) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Particles]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] (pick random (90) to (110)) (pick random (0) to (360)) [1]\n    Color [20] Brightness (pick random (0) to (25)) Transparency (pick random (0) to (15))\n    switch costume to (particle v)\n    show\n    set [i v] to (pick random (22) to (35))\n    set [j v] to [0.8]\n    repeat until <(y position) < [-160]>\n        if on edge, bounce\n        set [i v] to ((i) * (0.88))\n        change [j v] by (-0.25)\n        move (i) steps\n        change y by (j)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Bars2]> then\n    go to [front v] layer\n    if <(XMot) = [325]> then\n        go [backward v] (2) layers\n    end\n    Animate [200] [150] [0] [2] [1]\n    Color (Color) Brightness (Brightness) Transparency (Transparency)\n    clear graphic effects\n    show\n    switch costume to (thin bar v)\n    repeat until <[100] = (round (size))>\n        Animate (XMot) [0] [100] [90] [5]\n        Color [20] Brightness [5] Transparency [0]\n    end\n    go to x: (XMot) y: (0)\n    point in direction (90)\n    wait (1) seconds\n    delete this clone\nend\n\ndefine Create Bars\nset [id v] to [Smooth Bar]\ngo to x: (-1000000000) y: (10000000000)\nset [xmot v] to [-220]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [xmot v] by (50)\nend\n\nwhen I start as a clone\nif <(ID) = [Smooth Bar]> then\n    show\n    switch costume to (bar v)\n    set size to (100) %\n    show\n    go to [front v] layer\n    point in direction (90)\n    repeat until <<(round (x position)) = (XMot)> and <(round (y position)) = [0]>>\n        Pos (XMot) [0] [4]\n        Color [20] Brightness [50] Transparency [0]\n    end\n    wait (1) seconds\n    delete this clone\nend\n\ndefine Bouncy Bars\nset [id v] to [Bouncy Bars]\nset [bar y v] to [240]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [bar y v] by (-60)\nend\nset [bar y v] to [0]\n\nwhen I start as a clone\nif <(ID) = [Bouncy Bars]> then\n    go to [front v] layer\n    show\n    set size to (0) %\n    switch costume to (bar2 v)\n    go to x: (-100000000) y: (Bar Y)\n    point in direction (0)\n    repeat (10)\n        set [bar y v] to (((Bar Y) * (.6)) + (((0) - (x position)) / (3)))\n        change x by (Bar Y)\n        change size by (((130) - (size)) / (5))\n        Color [20] Brightness [15] Transparency [0]\n        go to [front v] layer\n    end\n    repeat (20)\n        set [bar y v] to (((Bar Y) * (.6)) + (((0) - (x position)) / (3)))\n        change x by (Bar Y)\n        change size by (((130) - (size)) / (5))\n        Color [20] Brightness [15] Transparency [0]\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Fill]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [100] [5000000000000] [0] [-90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (bar2 v)\n    go to [front v] layer\n    show\n    repeat until <<[0] = (round (x position))> and <[0] = (round (y position))>>\n        switch costume to (size bypass v)\n        Animate [0] [0] [130] [0] [5]\n        switch costume to (bar2 v)\n    end\n    Animate [0] [0] [130] [0] [1]\nend\n\ndefine Clone Sprite ID (id) (#)\nset [id v] to (id)\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\ndefine Pos (x) (y) (speed)\nchange x by (((round (x)) - (round (x position))) / (speed))\nchange y by (((round (y)) - (round (y position))) / (speed))\n\nwhen I start as a clone\nif <(ID) = [Fill]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [100] [5000000000000] [0] [-90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (bar2 v)\n    go to [front v] layer\n    show\n    repeat until <<[0] = (round (x position))> and <[0] = (round (y position))>>\n        switch costume to (size bypass v)\n        Animate [0] [0] [130] [0] [5]\n        switch costume to (bar2 v)\n    end\n    Animate [0] [0] [130] [0] [1]\nend\n\nwhen I start as a clone\nif <(ID) = [Text]> then\n    go to [front v] layer\n    show\n    clear graphic effects\n    switch costume to (text v)\n    go to x: (1000) y: (1000)\n    point in direction (158)\n    set size to (200) %\n    repeat until <<<<[0] = (round (x position))> and <[0] = (round (y position))>> and <[90] = (round (direction))>> and <[100] = (round (size))>>\n        Animate [0] [0] [100] [90] [5]\n    end\nend\n\nwhen I receive [end intro v]\ndelete this clone\n\n@Moving Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\n@Bouncy\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@TN\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\nforever\n    set [timeflow v] to (timer)\nend\n\nwhen [timer v] > (TimeFlow)\ngo to [front v] layer\nclear graphic effects\nshow\n\n@Cannon\n\ndefine Oof (x) (y)\nif <(y) < (y position)> then\n    set [oof v] to (([atan v] of (((x) - (x position)) / ((y) - (y position))) ) + (180))\nelse\n    set [oof v] to ([atan v] of (((x) - (x position)) / ((y) - (y position))) )\nend\npoint in direction (Oof)\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        show\n    else\n        hide\n    end\n    Oof ([x position v] of [player v]) ([y position v] of [player v])\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        wait (1.5) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (bullet v)\nshow\nrepeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (ground v)?>>>\n    move (7) steps\nend\ndelete this clone\n\nwhen I receive [enemy respawn v]\ndelete this clone\n\n@Fade\n\nwhen flag clicked\nswitch costume to (fade v)\nhide\n\nwhen I receive [fade v]\nswitch costume to (fade v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nswitch costume to (fade2 v)\nrepeat (20)\n    set [brightness v] effect to (50)\n    change [whirl v] effect by (100)\nend\nclear graphic effects\nswitch costume to (win v)\n\nwhen I receive [begin gameplay v]\nforever\n    play sound [Adventure v] until done\nend\n\nwhen I receive [fade v]\nstop all sounds\n\n@Skip\n\nwhen flag clicked\nhide\n\nwhen I receive [begin gameplay v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(Level) = [9]> then\n            broadcast (Fade v)\n        else\n            change [level v] by (1)\n            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        end\n    end\nend\n\n@Condition\n\nwhen I receive [begin gameplay v]\nshow\nset [ghost v] effect to (100)\nwait until <(Level) = [2]>\nset [sense v] to [0]\nrepeat (2)\n    wait until <touching (player v)?>\n    change [sense v] by (1)\n    wait until <not <touching (player v)?>>\nend\nbroadcast (Help v)\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nwhen [timer v] > (0)\nhide\n\n@Help\n\nwhen flag clicked\nset [power v] to [0]\nhide\n\nwhen I receive [help v]\nshow\nset [power v] to [1]\nwait until <(Level) = [3]>\nhide\n\nwhen I receive [begin gameplay v]\nwait until <(Level) = [3]>\nif <(Power) = [0]> then\n    set [power v] to [1]\nend\n\n@Saws\n\nwhen flag clicked\nhide\n\nwhen I receive [enemy respawn v]\nif <(Level) = (Level)> then\n    delete this clone\nend\nif <(Level) = [3]> then\n    Clone Saw at [85] [-5] Size [80] Spin Amount [5]\n    Clone Saw at [-85] [-5] Size [65] Spin Amount [2]\nelse\n    if <(Level) = [5]> then\n        Clone Saw at [-60] [75] Size [80] Spin Amount [15]\n    else\n        if <(Level) = [7]> then\n            set [move v] to [1]\n            set [spin val v] to (([cos v] of ((timer) * (30)) ) * (20))\n            go to x: ((([tan v] of ((timer) * (30)) ) * (20)) + (95)) y: ((([sin v] of ((timer) * (30)) ) * (20)) + (110))\n            set size to ((([sin v] of ((timer) * (30)) ) * (20)) + (50)) %\n            create clone of (_myself_ v)\n        else\n        end\n    end\nend\n\ndefine Clone Saw at (x) (y) Size (size) Spin Amount (spin val)\nset [move v] to [0]\nset [spin val v] to (spin val)\ngo to x: (x) y: (y)\nset size to (size) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    turn right (Spin Val) degrees\nend\n\nwhen I start as a clone\nshow\nif <(Move) = [1]> then\n    forever\n        turn right (([cos v] of ((timer) * (30)) ) * (20)) degrees\n        go to x: ((([tan v] of ((timer) * (30)) ) * (20)) + (95)) y: ((([sin v] of ((timer) * (30)) ) * (20)) + (110))\n        set size to ((([sin v] of ((timer) * (30)) ) * (20)) + (50)) %\n    end\nend\n\n@Up Orbs\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Right Orbs\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Chaos\n\ndefine Dimish Shake\nclear graphic effects\nset size to (1000) %\nrepeat until <[100] = (round (size))>\n    go to x: (([sin v] of ((timer) * (1000)) ) * (((size) - (100)) * (0.1))) y: (([sin v] of ((timer) * (800)) ) * (((size) - (100)) * (0.1)))\n    change size by (((100) - (size)) / (7))\nend\n\nwhen flag clicked\nhide\nwait until <(Level) = [6]>\nswitch costume to (chaos 1 v)\nshow\nrepeat (5)\n    Dimish Shake\n    next costume\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (Earth v)\n\n@Water\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\n@Lasers\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    if <((round (timer)) mod (2)) = [0]> then\n        show\n        wait (1.5) seconds\n    else\n        hide\n        wait (1.5) seconds\n    end\nend\n\n@Down Orbs\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n