Grappler A Platformer
@Stage\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@kill\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\n@next level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@player\n\nwhen flag clicked\nbroadcast (bericht1 v)\n\nwhen I receive [bericht1 v]\nset [raak v] to [0]\ngo to x: (-170) y: (-80)\nset [x vell v] to [0]\nset [y vell v] to [0]\nset [r v] to [0]\nforever\n    move\n    create clone of (_myself_ v)\n    if <(x position) > (mouse x)> then\n        switch costume to (uiterlijk2 v)\n    else\n        switch costume to (uiterlijk1 v)\n    end\nend\n\ndefine move\nif <(raak) = [0]> then\n    change [y vell v] by (-2)\n    set [r v] to ((r) + (((0) - (r)) / (10)))\n    point in direction (0)\nelse\n    point towards (line v)\n    set [r v] to ((r) + (((direction) - (r)) / (10)))\nend\nset rotation style [don't rotate v]\nset [x vell v] to ((x vell) * (0.95))\nset [y vell v] to ((y vell) * (0.95))\nchange x by (x vell)\nif <touching (ground v)?> then\n    if <(x vell) > [0]> then\n        repeat until <not <touching (ground v)?>>\n            change x by (-1)\n        end\n    else\n        repeat until <not <touching (ground v)?>>\n            change x by (1)\n        end\n    end\n    set [x vell v] to [0]\nend\nchange y by (y vell)\nif <touching (ground v)?> then\n    if <(y vell) > [0]> then\n        repeat until <not <touching (ground v)?>>\n            change y by (-1)\n        end\n    else\n        repeat until <not <touching (ground v)?>>\n            change y by (1)\n        end\n    end\n    set [y vell v] to [0]\nend\npoint in direction (r)\nset rotation style [all around v]\nif <touching (kill v)?> then\n    broadcast (bericht1 v)\n    stop [this script v]\nend\nif <touching (next level v)?> then\n    change [level v] by (1)\n    broadcast (bericht1 v)\n    stop [this script v]\nend\n\nwhen I start as a clone\nset size to (80) %\nset [ghost v] effect to (50)\nswitch costume to (uiterlijk3 v)\nrepeat (10)\n    turn right (3) degrees\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n@line\n\ndefine move\nrepeat (50)\n    if <not <touching (ground v)?>> then\n        move (1) steps\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    set [raak v] to [0]\n    wait until <mouse down?>\n    go to (hand v)\n    point towards (mouse-pointer v)\n    repeat until <touching (ground v)?>\n        move\n    end\n    move (5) steps\n    set [raak v] to [1]\n    repeat until <<not <mouse down?>> or <(raak) = [0]>>\n        if <(x position) > ([x position v] of [player v])> then\n            change [x vell v] by (1)\n        else\n            change [x vell v] by (-1)\n        end\n        if <(y position) > ([y position v] of [player v])> then\n            change [y vell v] by (1)\n        else\n            change [y vell v] by (-1)\n        end\n    end\nend\n\n@pen\n\nwhen flag clicked\nset pen color to (#000000)\nset pen size to (1)\nset [ghost v] effect to (100)\nforever\n    erase all\n    if <mouse down?> then\n        go to (hand v)\n        pen down\n        go to (line v)\n        pen up\n    end\nend\n\n@front\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\n\n@hand\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    go to (player v)\n    point towards (mouse-pointer v)\n    move ((20) + ((distance to [mouse-pointer v]) / (25))) steps\nend\n\n
Mouse down to shoot