»  Simple | A Platformer
@Stage\n\ndefine Data To Compute: (#datainput1) (#datainput2) (#datainput3) (#datainput4)\nData To Compute: [999] [999] [999] [999]\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\nwhen I receive [startproject v]\n\nswitch backdrop to (2 v)\nwait (1) seconds\nforever\n    play sound [Chain Beat v] until done\nend\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\ngo to [front v] layer\nswitch backdrop to (backdrop1 v)\ngo to x: (-220) y: (0)\ngo to [front v] layer\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#ffe013)?> then\n        change y by (1)\n        if <touching color (#ffe013)?> then\n            change y by (1)\n            if <touching color (#ffe013)?> then\n                change y by (1)\n                if <touching color (#ffe013)?> then\n                    change y by (1)\n                end\n                if <touching color (#ffe013)?> then\n                    change y by (1)\n                    if <touching color (#ffe013)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-5]\n                            else\n                                set [xv v] to [5]\n                            end\n                            set [yv v] to [12]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#ffe013)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#ffe013)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [12]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [startproject v]\nforever\n    if <touching color (#ce7dff)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#ffa446)?> then\n        set [xv v] to [15]\n    end\n    if <touching color (#000000)?> then\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-220) y: (0)\n    end\n    if <(y position) < [-180]> then\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-220) y: (0)\n    end\n    if <(x position) > [240]> then\n        broadcast (Next Level v)\n        go to x: (-220) y: (0)\n        set [yv v] to [0]\n        set [xv v] to [0]\n    end\nend\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [startproject v]\nshow\nswitch costume to (1 v)\n\n@Thumbnail\n\nwhen I receive [startproject v]\nforever\n    show\n    go to [front v] layer\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n@Intro\n\ndefine Data To Compute: (#datainput1) (#datainput2) (#datainput3) (#datainput4)\nData To Compute: [999] [999] [999] [999]\n\ndefine Size up with speed (s)\nrepeat (10)\n    change size by ([abs v] of (((0) - (size)) / (3)) )\nend\nrepeat (30)\n    set [size_int v] to ((((size_int) * (.65)) + (((250) - (size)) / (6))) + (s))\n    change size by (size_int)\nend\n\ndefine Smooth Glide to x (x) y (y) at speed (s)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (s))\n    change y by (((round (y)) - (round (y position))) / (s))\nend\ngo to x: (x position) y: (y position)\n\nwhen flag clicked\nsetup\n\nwhen I start as a clone\npoint in direction (90)\nif <(clone_id) = [1]> then\n    go to x: (-114) y: (121)\n    switch costume to (tran_1 v)\n    Smooth Glide to x (0) y (0) at speed (7)\n    wait (.6) seconds\n    glide (.2) secs to x: (-114) y: (121)\n    delete this clone\nelse\n    if <(clone_id) = [2]> then\n        go to x: (114) y: (-121)\n        switch costume to (tran1_2 v)\n        Smooth Glide to x (0) y (0) at speed (7)\n        wait (.6) seconds\n        glide (.2) secs to x: (114) y: (-121)\n        delete this clone\n    else\n        if <(clone_id) = [3]> then\n            wait (.2) seconds\n            go to x: (-114) y: (121)\n            switch costume to (tran2_1 v)\n            Smooth Glide to x (0) y (0) at speed (7)\n            wait (.2) seconds\n            glide (.2) secs to x: (-114) y: (121)\n            delete this clone\n        else\n            if <(clone_id) = [4]> then\n                wait (.2) seconds\n                go to x: (114) y: (-121)\n                switch costume to (tran2_2 v)\n                Smooth Glide to x (0) y (0) at speed (7)\n                wait (.2) seconds\n                glide (.2) secs to x: (114) y: (-121)\n                delete this clone\n            else\n                if <(clone_id) = [5]> then\n                    go to [back v] layer\n                    switch costume to (logo v)\n                    set size to (1) %\n                    Size up with speed (-6)\n                    wait (.6) seconds\n                    Smooth Glide to x (-140) y (0) at speed (6)\n                else\n                    if <(clone_id) = [6]> then\n                        wait (.5) seconds\n                        switch costume to (t1 v)\n                        go to x: (-215) y: (-156)\n                        set size to (100) %\n                        Smooth Glide to x (-91) y (-55) at speed (6)\n                    else\n                        if <(clone_id) = [7]> then\n                            wait (.7) seconds\n                            switch costume to (u1 v)\n                            go to x: (-206) y: (-104)\n                            set size to (85) %\n                            Smooth Glide to x (-130) y (-61) at speed (7)\n                        else\n                            if <(clone_id) = [10]> then\n                                go to [front v] layer\n                                Transition with delay: [0] and x: [0] y: [0] [line1] [line25] [200]\n                            else\n                                if <(clone_id) = [11]> then\n                                    Transition with delay: [.3] and x: [0] y: [20] [line1] [line25] [200]\n                                else\n                                    if <(clone_id) = [12]> then\n                                        Transition with delay: [.45] and x: [0] y: [-20] [line1] [line25] [200]\n                                    else\n                                        if <(clone_id) = [13]> then\n                                            set size to (50) %\n                                            Transition with delay: [.6] and x: [-191] y: [-142] [v1] [v12] [20]\n                                        else\n                                            if <(clone_id) = [14]> then\n                                                Transition with delay: [.5] and x: [-191] y: [-162] [line1] [line5] [200]\n                                            else\n                                                if <(clone_id) = [15]> then\n                                                    wait (.5) seconds\n                                                    set size to (50) %\n                                                    go to x: (116) y: (100)\n                                                    point in direction (90)\n                                                    Costume start [bend1] costume end [bend10]\n                                                    Smooth Rotate to (-179) degrees at speed (3)\n                                                    Costume start [bend10] costume end [bend20]\n                                                    delete this clone\n                                                else\n                                                    if <(clone_id) = [16]> then\n                                                        set size to (150) %\n                                                        wait (2) seconds\n                                                        switch costume to (retro1 v)\n                                                        go to x: (0) y: (-240)\n                                                        Smooth Glide to x (0) y (0) at speed (6)\n                                                        repeat until <(beat cal) = [1]>\n                                                            go to x: (0) y: (((([sin v] of ((timer) * (100)) ) * (10)) * (.7)) - (0))\n                                                        end\n                                                    else\n                                                        if <(clone_id) = [17]> then\n                                                            go [backward v] (1) layers\n                                                            set size to (150) %\n                                                            wait (2.2) seconds\n                                                            switch costume to (retro2 v)\n                                                            go to x: (0) y: (-240)\n                                                            Smooth Glide to x (0) y (0) at speed (6)\n                                                            repeat until <(beat cal) = [1]>\n                                                                go to x: (0) y: (((([sin v] of ((timer) * (100)) ) * (10)) * (.7)) - (0))\n                                                            end\n                                                        else\n                                                            if <(clone_id) = [18]> then\n                                                                go [backward v] (1) layers\n                                                                set size to (150) %\n                                                                wait (2.4) seconds\n                                                                switch costume to (retro3 v)\n                                                                go to x: (0) y: (-240)\n                                                                Smooth Glide to x (0) y (0) at speed (6)\n                                                                repeat until <(beat cal) = [1]>\n                                                                    go to x: (0) y: (((([sin v] of ((timer) * (100)) ) * (10)) * (.7)) - (0))\n                                                                end\n                                                            else\n                                                                if <(clone_id) = [19]> then\n                                                                    go [backward v] (1) layers\n                                                                    go to [back v] layer\n                                                                    set size to (150) %\n                                                                    wait (2.4) seconds\n                                                                    switch costume to (retro4 v)\n                                                                    go to x: (0) y: (-240)\n                                                                    Smooth Glide to x (0) y (0) at speed (6)\n                                                                    repeat until <(beat cal) = [1]>\n                                                                        go to x: (0) y: (((([sin v] of ((timer) * (100)) ) * (10)) * (.7)) - (0))\n                                                                    end\n                                                                else\n                                                                    if <(clone_id) = [20]> then\n                                                                        set [ghost v] effect to (0)\n                                                                        set [color v] effect to (50)\n                                                                        go to [back v] layer\n                                                                        switch costume to (hex1 v)\n                                                                        Smooth Size to (2000) % at speed (20)\n                                                                    else\n                                                                        if <(clone_id) = [21]> then\n                                                                            go to [back v] layer\n                                                                            set [ghost v] effect to (50)\n                                                                            switch costume to (back1 v)\n                                                                            point in direction (45)\n                                                                            go to x: (178) y: (-134)\n                                                                            repeat until <(beat cal) = [1]>\n                                                                                turn right (.1) degrees\n                                                                                change x by (-.2)\n                                                                                change y by (.2)\n                                                                            end\n                                                                        else\n                                                                            if <(clone_id) = [22]> then\n                                                                                go to [back v] layer\n                                                                                set [ghost v] effect to (50)\n                                                                                switch costume to (back2 v)\n                                                                                point in direction (96)\n                                                                                go to x: (-213) y: (49)\n                                                                                repeat until <(beat cal) = [1]>\n                                                                                    turn right (.15) degrees\n                                                                                    change x by (.2)\n                                                                                    change y by (.2)\n                                                                                end\n                                                                            else\n                                                                                if <(clone_id) = [23]> then\n                                                                                    go to [front v] layer\n                                                                                    Transition with delay: [2.6] and x: [0] y: [0] [wind1] [wind28] [100]\n                                                                                else\n                                                                                    if <(clone_id) = [24]> then\n                                                                                        go to [front v] layer\n                                                                                        Transition with delay: [2.8] and x: [0] y: [20] [wind1] [wind28] [100]\n                                                                                    else\n                                                                                        if <(clone_id) = [25]> then\n                                                                                            go to [front v] layer\n                                                                                            Transition with delay: [3] and x: [0] y: [-20] [wind1] [wind28] [100]\n                                                                                        else\n                                                                                            if <(clone_id) = [26]> then\n                                                                                                go to x: (11) y: (-85)\n                                                                                                wait (4) seconds\n                                                                                                switch costume to (title1 v)\n                                                                                                repeat until <(costume [name v]) = [Title15]>\n                                                                                                    next costume\n                                                                                                end\n                                                                                            else\n                                                                                                if <(clone_id) = [27]> then\n                                                                                                    set [ghost v] effect to (100)\n                                                                                                    switch costume to (projtitle v)\n                                                                                                    go to x: (-180) y: (-85)\n                                                                                                    wait (4.2) seconds\n                                                                                                    set [ghost v] effect to (0)\n                                                                                                    Smooth Glide to x (-15) y (-85) at speed (10)\n                                                                                                else\n                                                                                                    if <(clone_id) = [28]> then\n                                                                                                        set [ghost v] effect to (100)\n                                                                                                        switch costume to (costume1 v)\n                                                                                                        go to x: (0) y: (0)\n                                                                                                        wait (5.4) seconds\n                                                                                                        repeat (10)\n                                                                                                            change [ghost v] effect by (-10)\n                                                                                                        end\n                                                                                                        stop [this script v]\n                                                                                                    end\n                                                                                                end\n                                                                                            end\n                                                                                        end\n                                                                                    end\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(clone_id) > [5]> and <(clone_id) < [10]>> then\n    set [ghost v] effect to (100)\n    wait (pick random (.5) to (.7)) seconds\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(clone_id) = [6]> then\n    wait (.9) seconds\n    switch costume to (t1 v)\n    repeat until <(costume [name v]) = [t5]>\n        next costume\n    end\nend\n\nwhen I start as a clone\nif <(clone_id) = [7]> then\n    wait (.9) seconds\n    switch costume to (u1 v)\n    repeat until <(costume [name v]) = [u5]>\n        next costume\n    end\nend\n\ndefine Transition with delay: (sec) and x: (x) y: (y) (costume start?) (costume end?) (size)\nset size to (size) %\ngo to x: (x) y: (y)\nwait (sec) seconds\nswitch costume to (costume start?)\nrepeat until <(costume [name v]) = (costume end?)>\n    next costume\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<(clone_id) = [13]> or <(clone_id) = [15]>> then\n        set size to (50) %\n    end\nend\n\ndefine setup\nset volume to (100) %\nstart sound [ Shadows - Witchout v]\nset size to (100) %\nset [size_int v] to [0]\nset [beat cal v] to [0]\nset [tran speed v] to [0]\nset [x v] to [0]\nset [y v] to [-240]\nset [clone_id v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (null v)\nrepeat (28)\n    change [clone_id v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine Costume start (cs) costume end (ce)\nswitch costume to (cs)\nrepeat until <(costume [name v]) = (ce)>\n    next costume\nend\nstop [this script v]\n\nwhen I start as a clone\nforever\n    if <(clone_id) = [5]> then\n        repeat (100)\n            point in direction ((([tan v] of ((timer) * (100)) ) * (8)) + (90))\n        end\n        forever\n            point in direction ((([sin v] of ((timer) * (100)) ) * (8)) + (90))\n        end\n    end\nend\n\nwhen flag clicked\nshow\nstop all sounds\nclear sound effects\nclear graphic effects\nset volume to (100) %\nwait (6) seconds\nrepeat (10)\n    change volume by (-10)\n    change [ghost v] effect by (10)\nend\nhide\nset size to (0) %\nset [ghost v] effect to (100)\nbroadcast (StartProject v)\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nif <(clone_id) = [20]> then\n    wait (.1) seconds\n    Costume start [hex1] costume end [hex12]\n    delete this clone\nend\n\ndefine Smooth Size to (%) % at speed (s)\nrepeat until <(round (size)) = (round (%))>\n    change size by (((round (%)) - (round (size))) / (s))\nend\nset size to (%) %\n\ndefine Smooth Rotate to (d) degrees at speed (s)\nrepeat until <(round (direction)) = (round (d))>\n    turn right (((round (d)) - (round (direction))) / (s)) degrees\nend\npoint in direction (d)\n\ndefine Data To Compute: (#datainput1) (#datainput2) (#datainput3) (#datainput4)\nData To Compute: [999] [999] [999] [999]\n\n