[Closed] Grappling Hook Platformer Contest!
@Stage\n\n@Clickbait\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n@Grappling Hook Engine\n\nwhen flag clicked\nshow\nset [speed v] to [1]\nset [jump height v] to [10]\nset [hook throw distance v] to [25]\nReset Player to x: [-210] y: [-90]\nwait until <not <mouse down?>>\nforever\n    erase all\n    if <<touching (bad v)?> or <(y position) < [-170]>> then\n        Reset Player to x: [-210] y: [-90]\n    end\n    if <not <<mouse down?> or <key (space v) pressed?>>> then\n        set [hook just activated v] to [0]\n    end\n    if <not <[2] = (HStage)>> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n            change [xvel v] by ((Speed) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>))\n        end\n        set [xvel v] to ((0.8) * (xvel))\n        change x by (xvel)\n        if <touching (ground v)?> then\n            change x by ((0) - (xvel))\n            set [xvel v] to ((-0.3) * (xvel))\n        end\n    end\n    change [yvel v] by (-1)\n    set [yvel v] to ((0.98) * (yvel))\n    change y by (yvel)\n    if <touching (ground v)?> then\n        change y by ((0) - (yvel))\n        if <[0] < (yvel)> then\n            set [yvel v] to ((-0.5) * (yvel))\n        else\n            set [yvel v] to [0]\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yvel v] to (Jump Height)\n            end\n        end\n        if <[2] = (HStage)> then\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                change [xvel v] by ((Speed) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>))\n            end\n            set [xvel v] to ((0.8) * (xvel))\n            if <<<mouse down?> or <key (space v) pressed?>> and <[0] = (Hook Just Activated)>> then\n                set [hook just activated v] to [1]\n                set [hstage v] to [3]\n                set [yvel v] to (((xvel) / ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) ))\n            end\n            change x by (xvel)\n            if <touching (ground v)?> then\n                change x by ((0) - (xvel))\n                set [xvel v] to ((-0.3) * (xvel))\n            end\n        end\n    else\n        if <[2] = (HStage)> then\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                change [xvel v] by ((Speed) * ((0.3) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)))\n            end\n            set [xvel v] to ((1) * (xvel))\n            if <<<mouse down?> or <key (space v) pressed?>> and <[0] = (Hook Just Activated)>> then\n                set [hook just activated v] to [1]\n                set [hstage v] to [3]\n                set [yvel v] to ((0) - (((xvel) / ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n            end\n            change x by (xvel)\n            if <touching (ground v)?> then\n                change x by ((0) - (xvel))\n                set [xvel v] to ((-0.3) * (xvel))\n            end\n        end\n    end\n    set [px v] to (x position)\n    set [py v] to (y position)\n    if <[2] = (HStage)> then\n        if <(Hdis) < ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )> then\n            set x to ((Hx) + ((Hdis) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n            if <touching (ground v)?> then\n                set x to (Px)\n                set [xvel v] to ((-0.5) * (xvel))\n            else\n                change [xvel v] by ((-1) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) ))\n            end\n            set y to ((Hy) + ((Hdis) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n            if <touching (ground v)?> then\n                set y to (Py)\n            end\n            set [yvel v] to [0]\n        end\n        set [px v] to (x position)\n        set [py v] to (y position)\n        if <not <[0] = (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)>> then\n            change [hdis v] by ((Speed) * ((3) * (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)))\n            if <(Hdis) < ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )> then\n                set x to ((Hx) + ((Hdis) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                set y to ((Hy) + ((Hdis) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                if <touching (ground v)?> then\n                    go to x: (Px) y: (Py)\n                    change [hdis v] by ((Speed) * ((-3) * (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)))\n                end\n            end\n            if <[10] > (Hdis)> then\n                set [hdis v] to [10]\n            end\n        end\n        set [px v] to (x position)\n        set [py v] to (y position)\n    end\n    if <not <[0] = (HStage)>> then\n        switch costume to (grappling hook v)\n        go to x: (Hx) y: (Hy)\n        if <[3] = (HStage)> then\n            set [hstage v] to [0]\n            set x to ((Px) + ((Hdis) * ([sin v] of (([atan v] of (((Hx) - (Px)) / ((Hy) - (Py))) ) + (((((Hy) - (Py)) / ([abs v] of ((Hy) - (Py)) )) - (1)) * (90))) )))\n            set y to ((Py) + ((Hdis) * ([cos v] of (([atan v] of (((Hx) - (Px)) / ((Hy) - (Py))) ) + (((((Hy) - (Py)) / ([abs v] of ((Hy) - (Py)) )) - (1)) * (90))) )))\n            if <[10] > (Hdis)> then\n                set [hstage v] to [0]\n            end\n        else\n            set [hxvel v] to ((0.98) * (Hxvel))\n            change x by (Hxvel)\n            if <not <touching (ground v)?>> then\n                change [hyvel v] by (-1)\n            end\n            set [hyvel v] to ((0.98) * (Hyvel))\n            change y by (Hyvel)\n            if <touching (ground v)?> then\n                if <[1] = (HStage)> then\n                    set [hdis v] to ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )\n                end\n                set [hstage v] to [2]\n                set [hxvel v] to [0]\n                set [hyvel v] to [0]\n            end\n        end\n        set [hx v] to (x position)\n        set [hy v] to (y position)\n        go to x: (Px) y: (Py)\n        pen down\n        go to x: (Hx) y: (Hy)\n        pen up\n        stamp\n    else\n        if <<<mouse down?> or <key (space v) pressed?>> and <[0] = (Hook Just Activated)>> then\n            set [hook just activated v] to [1]\n            set [hstage v] to [1]\n            set [hx v] to (Px)\n            set [hy v] to ((5) + (Py))\n            set [hxvel v] to ((Hook Throw Distance) * ([sin v] of (([atan v] of (((mouse x) - (Px)) / ((mouse y) - (Py))) ) + (((((mouse y) - (Py)) / ([abs v] of ((mouse y) - (Py)) )) - (1)) * (90))) ))\n            set [hyvel v] to ((Hook Throw Distance) * ([cos v] of (([atan v] of (((mouse x) - (Px)) / ((mouse y) - (Py))) ) + (((((mouse y) - (Py)) / ([abs v] of ((mouse y) - (Py)) )) - (1)) * (90))) ))\n        end\n    end\n    if <<<[0] > (Hyvel)> and <[-179] > (Hy)>> and <touching (_edge_ v)?>> then\n        set [hstage v] to [0]\n    end\n    switch costume to (player v)\n    set x to (Px)\n    set y to (Py)\n    change [counter v] by (1)\nend\n\ndefine Reset Player to x: (x) y: (y)\ngo to x: (x) y: (y)\nset pen color to (#c88330)\nset pen size to (2)\nset [px v] to (x position)\nset [py v] to (y position)\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [hstage v] to [0]\nset [hxvel v] to [0]\nset [hyvel v] to [0]\n\n@Ground\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nhide\n\n@Bad\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nshow variable [hook throw distance v]\nshow variable [jump height v]\nshow variable [speed v]\n\nhide\n\nhide variable [jump height v]\nhide variable [hook throw distance v]\nhide variable [speed v]\n\n
Rules:\n1. It must have at least 10 levels\n2. It must be done by Thanksgiving (11/26/20)\n3. You can change the variables (Jump Height), (Speed), and (Hook Throw Distance) to change the game physics.\n4. The game must incorporate the grappling hook engine in some way\n\n\nRewards:\n1st Place: Gets 2 follows, 10 loves and faves, and a shoutout on my profile until 2021\nRunner-ups (x4): a love and fave on their entry\nNOTE: There will not be rewards if there isn't enough people participating\n\nTips:\n1. Be original. It'll give you a better chance at winning ;)\n2. Make the game look unique. Maybe add a foreground and background. Is the player swinging on a vine in the jungle, or are they scaling a building in a city. The choice is yours.\n3. You can add more features to the game, just keep the grappling hook element.