Sketched 2 || A Platformer                                               #Platformer #Capt_Boanerges

Instructions: Heyyy!\nPLEASE PLEASE PLEASEEEEE READ!!!!!!\nDISCLAIMER: THE GROUND IS SUPPOSED TO BE INVISIBLE\nWelcome to my first platformer on this account, an introduction to Scratch!\nThe floor is hidden, so think carefully ;)\nIf you need hints on certain levels, scroll wayyy down!\nWASD and arrow keys to move and m to mute music.\n-----------------------------------------------------------------------\nN E X T: -Dot Pen!-\nhttps://scratch.mit.edu/projects/546509988/\n\nP R E V I O U S: Scratch Character Customizer: \nhttps://scratch.mit.edu/projects/541668528/\n\n\n\n\n\n\n\n\nHINTS BELOW:\nLevel 1: Hop on top of a featured project\nLevel 2: Jump backwards (not gonna tell you when c;)\nLevel 3: There's a wall!\nLevel 4: Very simple, just jump forwards!\nLevel 5: Hop onto a project and wall jump somewhere\nLevel 6: This one's a hidden freebie :)\nLevel 7: Jump onto some code!

@Stage\n\n@スプライト1\n\nwhen flag clicked\nset rotation style [don't rotate v]\npen up\nerase all\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [大きさ v]\nadd [0] to [x v]\nadd [0] to [y v]\nadd [100] to [大きさ v]\nset [x v] to [0]\nset [y v] to [200]\nset [x+ v] to [0]\nset [y+ v] to [0]\nset [作る v] to [-]\nforever\n    erase all\n    背景\n    線 (x) (y)\n    作る\n    if <(作る) = [0]> then\n        自移動\n        移動\n    end\n    書く\nend\n\ndefine 書く\ngo to x: (0) y: (0)\nset pen color to (#ffffff)\nset pen size to (20)\npen down\npen up\nset [a v] to [0]\nrepeat (length of [x v])\n    change [a v] by (1)\n    go to x: ((item (a) of [x v]) - (x)) y: ((item (a) of [y v]) - (y))\n    set pen size to (item (a) of [大きさ v])\n    set pen color to (#ff0000)\n    set pen (color v) to (item (a) of [大きさ v])\n    pen down\n    pen up\nend\n\ndefine 移動\nset [a v] to [0]\nrepeat (length of [x v])\n    change [a v] by (1)\n    set [向き v] to (([atan v] of (((item (a) of [x v]) - (x)) / ((item (a) of [y v]) - (y))) ) + (<[0] > ((item (a) of [y v]) - (y))> * (180)))\n    set [距離 v] to ([sqrt v] of ((((item (a) of [x v]) - (x)) * ((item (a) of [x v]) - (x))) + (((item (a) of [y v]) - (y)) * ((item (a) of [y v]) - (y)))) )\n    change [x+ v] by ((([sin v] of (向き) ) * ((20) / (距離))) * ((((item (a) of [大きさ v]) / (2)) * ((item (a) of [大きさ v]) / (2))) / (2000)))\n    change [y+ v] by ((([cos v] of (向き) ) * ((20) / (距離))) * ((((item (a) of [大きさ v]) / (2)) * ((item (a) of [大きさ v]) / (2))) / (2000)))\nend\nchange [x v] by (x+)\nchange [y v] by (y+)\nset [a v] to [0]\nset [触れる v] to [-]\nrepeat (length of [x v])\n    change [a v] by (1)\n    set [距離 v] to ([sqrt v] of ((((item (a) of [x v]) - (x)) * ((item (a) of [x v]) - (x))) + (((item (a) of [y v]) - (y)) * ((item (a) of [y v]) - (y)))) )\n    if <(距離) < (((item (a) of [大きさ v]) / (2)) + (10))> then\n        repeat (10)\n            if <(距離) < (((item (a) of [大きさ v]) / (2)) + (10))> then\n                set [向き v] to (([atan v] of (((x) - (item (a) of [x v])) / ((y) - (item (a) of [y v]))) ) + (<[0] > ((y) - (item (a) of [y v]))> * (180)))\n                change [x v] by ([sin v] of (向き) )\n                change [y v] by ([cos v] of (向き) )\n                set [距離 v] to ([sqrt v] of ((((item (a) of [x v]) - (x)) * ((item (a) of [x v]) - (x))) + (((item (a) of [y v]) - (y)) * ((item (a) of [y v]) - (y)))) )\n            end\n        end\n        set [触れる v] to (a)\n        set [x+ v] to [0]\n        set [y+ v] to [0]\n    end\nend\n\ndefine 自移動\nif <not <(触れる) = [-]>> then\n    if <key (right arrow v) pressed?> then\n        point in direction (([atan v] of (((x) - (item (触れる) of [x v])) / ((y) - (item (触れる) of [y v]))) ) + (<[0] > ((y) - (item (触れる) of [y v]))> * (180)))\n        turn right (90) degrees\n        change [x+ v] by (([sin v] of (direction) ) * (2))\n        change [y+ v] by (([cos v] of (direction) ) * (2))\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (([atan v] of (((x) - (item (触れる) of [x v])) / ((y) - (item (触れる) of [y v]))) ) + (<[0] > ((y) - (item (触れる) of [y v]))> * (180)))\n        turn left (90) degrees\n        change [x+ v] by (([sin v] of (direction) ) * (2))\n        change [y+ v] by (([cos v] of (direction) ) * (2))\n    end\n    if <key (up arrow v) pressed?> then\n        point in direction (([atan v] of (((x) - (item (触れる) of [x v])) / ((y) - (item (触れる) of [y v]))) ) + (<[0] > ((y) - (item (触れる) of [y v]))> * (180)))\n        change [x+ v] by (([sin v] of (direction) ) * (6))\n        change [y+ v] by (([cos v] of (direction) ) * (6))\n    end\nend\n\ndefine 作る\nif <mouse down?> then\n    if <(作る) = [0]> then\n        確かめ\n        if <(確かめ) = [-]> then\n            add ((mouse x) + (x)) to [x v]\n            add ((mouse y) + (y)) to [y v]\n            add [60] to [大きさ v]\n            set [作る v] to (length of [x v])\n        end\n        if <[0] < (確かめ)> then\n            delete (確かめ) of [x v]\n            delete (確かめ) of [y v]\n            delete (確かめ) of [大きさ v]\n            set [作る v] to [-]\n        end\n    else\n        if <[0] < (作る)> then\n            if <<(確かめ距離) > ((item (作る) of [大きさ v]) / (2))> and <[200] > (item (作る) of [大きさ v])>> then\n                replace item (作る) of [大きさ v] with ((item (作る) of [大きさ v]) + (2))\n            else\n                set [作る v] to [-]\n            end\n        end\n    end\nelse\n    set [作る v] to [0]\nend\n\ndefine 確かめ\nset [確かめ v] to [-]\nset [a v] to [0]\nset [確かめ距離 v] to [999999]\nrepeat (length of [x v])\n    change [a v] by (1)\n    go to x: ((item (a) of [x v]) - (x)) y: ((item (a) of [y v]) - (y))\n    set [距離 v] to ([sqrt v] of (((((item (a) of [x v]) - (x)) - (mouse x)) * (((item (a) of [x v]) - (x)) - (mouse x))) + ((((item (a) of [y v]) - (y)) - (mouse y)) * (((item (a) of [y v]) - (y)) - (mouse y)))) )\n    if <((距離) - (((item (a) of [大きさ v]) / (2)) + (20))) < (確かめ距離)> then\n        set [確かめ距離 v] to ((距離) - (((item (a) of [大きさ v]) / (2)) + (20)))\n    end\n    if <(距離) < (((item (a) of [大きさ v]) / (2)) + (60))> then\n        set [確かめ v] to [0]\n        if <<(距離) < ((item (a) of [大きさ v]) / (2))> and <not <(length of [x v]) = [1]>>> then\n            set [確かめ v] to (a)\n        end\n        stop [this script v]\n    end\nend\n\ndefine 背景\nset pen color to (#001335)\nset pen size to (200)\ngo to x: (-240) y: (90)\npen down\ngo to x: (240) y: (90)\ngo to x: (240) y: (-90)\ngo to x: (-240) y: (-90)\npen up\n\ndefine 線 (x) (y)\nset pen color to (#ffffff)\nset pen (transparency v) to (90)\nset pen size to (10)\nset y to ((180) - ((y) mod (60)))\nrepeat (6)\n    set x to (240)\n    pen down\n    set x to (-240)\n    pen up\n    change y by (-60)\nend\nset x to ((240) - ((x) mod (60)))\nrepeat (8)\n    set y to (-240)\n    pen down\n    set y to (240)\n    pen up\n    change x by (-60)\nend\nset pen (transparency v) to (0)\n\n