Prism - A Platformer
@Stage\n\ndefine color\nif <(level) = [1]> then\n    set [color v] effect to (0)\nend\nif <(level) = [2]> then\n    set [color v] effect to (10)\nend\nif <(level) = [3]> then\n    set [color v] effect to (30)\nend\nif <(level) = [4]> then\n    set [color v] effect to (40)\nend\nif <(level) = [5]> then\n    set [color v] effect to (50)\nend\nif <(level) = [6]> then\n    set [color v] effect to (60)\nend\nif <(level) = [7]> then\n    set [color v] effect to (80)\nend\nif <(level) = [8]> then\n    set [color v] effect to (100)\nend\nif <(level) = [9]> then\n    set [color v] effect to (120)\nend\nif <(level) = [10]> then\n    set [color v] effect to (160)\nend\n\nwhen flag clicked\nforever\n    color\nend\n\n@Bob\n\nwhen flag clicked\nhide\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nset [level v] to [1]\nhide variable [y-velocity v]\nhide variable [x-velocity v]\nhide variable [level v]\n\nwhen I receive [showtime v]\nshow\nset [x-velocity v] to [0]\nset [y-velocity v] to [0]\nset [deaths v] to [0]\nforever\n    change [y-velocity v] by (-0.7)\n    if <key (right arrow v) pressed?> then\n        change [x-velocity v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x-velocity v] by (-1)\n    end\n    set [x-velocity v] to ((X-Velocity) * (0.9))\n    change x by (X-Velocity)\n    if <touching (naughty guys v)?> then\n        change [deaths v] by (1)\n        set [x-velocity v] to [0]\n        set [y-velocity v] to [0]\n        broadcast (showtime v)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                if <key (up arrow v) pressed?> then\n                                    set [y-velocity v] to [10]\n                                    if <(X-Velocity) > [0]> then\n                                        set [x-velocity v] to [-10]\n                                    else\n                                        set [x-velocity v] to [10]\n                                    end\n                                else\n                                    change x by ((X-Velocity) * (-1))\n                                    set [x-velocity v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y-Velocity)\n    if <touching (naughty guys v)?> then\n        set [x-velocity v] to [0]\n        set [y-velocity v] to [0]\n        change [deaths v] by (1)\n        broadcast (showtime v)\n    end\n    if <touching (level v)?> then\n        change y by ((Y-Velocity) * (-1))\n        set [y-velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> and <key (up arrow v) pressed?>> then\n        set [y-velocity v] to [10]\n    end\n    change y by (1)\n    if <(x position) > [220]> then\n        change [level v] by (1)\n        broadcast (showtime v)\n    end\n    if <touching (bouncy boys v)?> then\n        change [y-velocity v] by (22)\n    end\n    if <touching (prism v)?> then\n        set [level v] to [11]\n        broadcast (showtime v)\n    end\n    if <touching (sprite1 v)?> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(y position) < [-150]> then\n        broadcast (showtime v)\n    end\nend\n\nwhen I receive [showtime v]\nif <(level) = [1]> then\n    switch costume to (costume1 v)\n    go to x: (-200) y: (-109)\nend\nif <(level) = [2]> then\n    go to x: (-200) y: (-93)\nend\nif <(level) = [3]> then\n    go to x: (-200) y: (-87)\nend\nif <(level) = [4]> then\n    go to x: (-200) y: (-88)\nend\nif <(level) = [5]> then\n    go to x: (-212) y: (-89)\nend\nif <(level) = [6]> then\n    go to x: (-200) y: (-102)\nend\nif <(level) = [7]> then\n    go to x: (-215) y: (-118)\nend\nif <(level) = [8]> then\n    go to x: (-200) y: (-109)\nend\nif <(level) = [9]> then\n    go to x: (-210) y: (-98)\nend\nif <(level) = [10]> then\n    go to x: (-195) y: (127)\nend\nif <(level) = [11]> then\n    go to x: (-200) y: (-99)\n    switch backdrop to (backdrop1 v)\n    switch costume to (costume2 v)\nend\n\nwhen I receive [fred v]\nforever\n    play sound [Fantasy v] until done\nend\n\ncreate clone of (_myself_ v)\n\n@Level\n\ndefine color\nif <(level) = [1]> then\n    set [color v] effect to (0)\nend\nif <(level) = [2]> then\n    set [color v] effect to (10)\nend\nif <(level) = [3]> then\n    set [color v] effect to (30)\nend\nif <(level) = [4]> then\n    set [color v] effect to (40)\nend\nif <(level) = [5]> then\n    set [color v] effect to (50)\nend\nif <(level) = [6]> then\n    set [color v] effect to (60)\nend\nif <(level) = [7]> then\n    set [color v] effect to (60)\nend\nif <(level) = [8]> then\n    set [color v] effect to (90)\nend\nif <(level) = [9]> then\n    set [color v] effect to (120)\nend\nif <(level) = [10]> then\n    set [color v] effect to (160)\nend\n\nwhen I receive [showtime v]\nshow\nforever\n    color\nend\n\nwhen I receive [showtime v]\nswitch costume to (level)\n\nwhen flag clicked\nhide\n\nif <[] = [1]> then\nif <(level) = [2]> then\n    switch costume to (costume1 v)\nend\nif <(level) = [3]> then\n    switch costume to (costume3 v)\nend\nif <(level) = [4]> then\n    switch costume to (costume4 v)\nend\nif <(level) = [5]> then\n    switch costume to (costume5 v)\nend\nif <(level) = [6]> then\n    switch costume to (costume6 v)\nend\nif <(level) = [7]> then\n    switch costume to (costume7 v)\nend\nif <(level) = [8]> then\n    switch costume to (costume8 v)\nend\nif <(level) = [9]> then\n    switch costume to (costume9 v)\nend\nif <(level) = [10]> then\n    switch costume to (costume10 v)\nend\nif <(level) = [11]> then\n    switch backdrop to (backdrop1 v)\n    switch costume to (costume11 v)\nend\n\n@Naughty Guys\n\nwhen I receive [showtime v]\nshow\nif <(level) = [1]> then\n    switch costume to (costume1 v)\nend\nif <(level) = [2]> then\n    switch costume to (costume6 v)\n    go to x: (25) y: (-112)\nend\nif <(level) = [3]> then\n    switch costume to (costume7 v)\n    go to x: (42) y: (-40)\nend\nif <(level) = [4]> then\n    switch costume to (costume8 v)\n    go to x: (185) y: (-43)\nend\nif <(level) = [5]> then\n    switch costume to (costume1 v)\n    go to x: (34) y: (-43)\nend\nif <(level) = [6]> then\n    switch costume to (costume10 v)\nend\nif <(level) = [7]> then\n    switch costume to (costume5 v)\nend\nif <(level) = [8]> then\n    switch costume to (costume2 v)\n    go to x: (157) y: (-20)\nend\nif <(level) = [9]> then\n    switch costume to (costume3 v)\n    go to x: (-15) y: (-4)\nend\nif <(level) = [10]> then\n    switch costume to (costume4 v)\n    go to x: (63) y: (60)\nend\nif <(level) = [11]> then\n    hide\nend\n\n@Prism\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [10]> then\n        show\n        go to x: (304) y: (-73)\n    end\n    if <(level) = [11]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [11]> then\n        show\n    end\nend\n\n@Bouncy Boys\n\nwhen I receive [showtime v]\nhide\nif <(level) = [6]> then\n    show\n    switch costume to (costume1 v)\nend\nif <(level) = [8]> then\n    show\n    switch costume to (costume2 v)\nend\nif <(level) = [9]> then\n    show\n    switch costume to (costume3 v)\nend\n\n@level number\n\ndefine color\nif <(level) = [1]> then\n    set [color v] effect to (0)\nend\nif <(level) = [2]> then\n    set [color v] effect to (10)\nend\nif <(level) = [3]> then\n    set [color v] effect to (30)\nend\nif <(level) = [4]> then\n    set [color v] effect to (40)\nend\nif <(level) = [5]> then\n    set [color v] effect to (50)\nend\nif <(level) = [6]> then\n    set [color v] effect to (60)\nend\nif <(level) = [7]> then\n    set [color v] effect to (60)\nend\nif <(level) = [8]> then\n    set [color v] effect to (90)\nend\nif <(level) = [9]> then\n    set [color v] effect to (120)\nend\nif <(level) = [10]> then\n    set [color v] effect to (160)\nend\n\nwhen I receive [showtime v]\nshow\nif <(level) = [1]> then\n    switch costume to (costume1 v)\nend\nif <(level) = [2]> then\n    switch costume to (costume2 v)\nend\nif <(level) = [3]> then\n    switch costume to (costume3 v)\nend\nif <(level) = [4]> then\n    switch costume to (costume4 v)\nend\nif <(level) = [5]> then\n    switch costume to (costume5 v)\nend\nif <(level) = [6]> then\n    switch costume to (costume6 v)\nend\nif <(level) = [7]> then\n    switch costume to (costume7 v)\nend\nif <(level) = [8]> then\n    switch costume to (costume8 v)\nend\nif <(level) = [9]> then\n    switch costume to (costume9 v)\nend\nif <(level) = [10]> then\n    switch costume to (costume10 v)\nend\nif <(level) = [11]> then\n    switch costume to (costume11 v)\nend\n\nwhen flag clicked\nhide\nforever\n    color\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\nforever\n    forever\n        change [ghost v] effect by (5)\n        wait (.025) seconds\n    end\nend\n\nwhen flag clicked\nwait (2) seconds\nbroadcast (showtime v)\nbroadcast (fred v)\nhide\n\n
Use Arrow keys to move\nLove #100 gets a follow\nTry the prequel! https://scratch.mit.edu/projects/301607399/\n\nYou are a little beam of light trying to get to a prism and make yourself colorful. If you touch the darkness spikes you get sucked backward. Grey will give you a boost.\n\n