Rayman (Scratch Edition) V1.0
@Stage\n\nwhen I receive [cloning and setup v]\nstop all sounds\nforever\n    if <(Level) = [2]> then\n        play sound [04 - Deep Forest.mp3 v] until done\n    else\n        play sound [07 - Betilla the Fairy.mp3 v] until done\n    end\nend\n\nwhen I receive [tick v]\nswitch backdrop to ((Level) - (1))\nif <(Dead?) = [1]> then\n    stop all sounds\n    start sound [50 - Oh no!.mp3 v]\nend\n\n@parallax_1\n\nwhen I receive [cloning and setup v]\nset [scroll_x v] to [0]\nset [scroll_y v] to [0]\ngo to x: (0) y: (0)\nset size to (101) %\ngo [backward v] (10) layers\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    hide\nelse\n    show\n    go to x: ((((SCROLL_X) + (X_Window)) / (2)) mod (1000)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\nwhen I receive [hide all v]\nhide\n\n@parallax_2\n\nwhen I receive [cloning and setup v]\ngo to x: (0) y: (0)\nset size to (101) %\ngo [backward v] (10) layers\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    hide\nelse\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (1000)) - (333)) y: (((SCROLL_Y) + (Y_Window)) / (2))\n    show\nend\n\nwhen I receive [hide all v]\nhide\n\n@parallax_3\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    hide\nelse\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (1000)) - (666)) y: (((SCROLL_Y) + (Y_Window)) / (2))\n    show\nend\n\nwhen I receive [cloning and setup v]\ngo to x: (0) y: (0)\nset size to (101) %\ngo [backward v] (10) layers\n\nwhen I receive [hide all v]\nhide\n\n@parallax_4\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    hide\nelse\n    show\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (1000)) - (999)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\nwhen I receive [cloning and setup v]\ngo to x: (0) y: (0)\nset size to (101) %\ngo [backward v] (10) layers\n\nwhen I receive [hide all v]\nhide\n\n@Parallax_5\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    hide\nelse\n    show\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (1000)) - (1332)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\nwhen I receive [cloning and setup v]\ngo to x: (0) y: (0)\nset size to (101) %\n\nwhen I receive [hide all v]\nhide\n\n@Boarder\n\nwhen I receive [cloning and setup v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [bettila words v]\ngo to [front v] layer\n\nwhen I receive [begin game v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\n@Platform_Aesetics\n\nwhen I receive [cloning and setup v]\nif <(Level) = [1]> then\n    set [x_window v] to [0]\n    set [pos_x v] to [0]\n    set size to (149) %\n    switch costume to (costume1 v)\n    show\n    go to x: (0) y: (0)\n    next costume\n    change [pos_x v] by (713)\n    create clone of (_myself_ v)\n    repeat (3)\n        next costume\n        change [pos_x v] by (713)\n        create clone of (_myself_ v)\n    end\n    switch costume to (costume1 v)\n    set [pos_x v] to [0]\nend\nif <(Level) = [2]> then\n    set [x_window v] to [0]\n    set [pos_x v] to [0]\n    set size to (149) %\n    switch costume to (1 v)\n    show\n    go to x: (0) y: (0)\n    next costume\n    change [pos_x v] by (713)\n    create clone of (_myself_ v)\n    repeat (3)\n        next costume\n        change [pos_x v] by (713)\n        create clone of (_myself_ v)\n    end\n    switch costume to (1 v)\n    set [pos_x v] to [0]\nend\n\nwhen I receive [hide all v]\nhide\n\nif  then\n    set [x_window v] to [0]\n    set [pos_x v] to [0]\n    set size to (149) %\n    switch costume to (1 v)\n    show\n    go to x: (0) y: (0)\n    next costume\n    change [pos_x v] by (713)\n    create clone of (_myself_ v)\n    repeat (3)\n        next costume\n        change [pos_x v] by (713)\n        create clone of (_myself_ v)\n    end\n    switch costume to (1 v)\n    set [pos_x v] to [0]\nend\n\nwhen I receive [tick v]\nset y to (((SCROLL_Y) + (86)) + (Y_Window))\nset x to (((POS_X) + (SCROLL_X)) + (X_Window))\n\nwhen I receive [render v]\nset y to (((SCROLL_Y) + (86)) + (Y_Window))\nset x to (((POS_X) + (SCROLL_X)) + (X_Window))\n\n@Rayman\n\nwhen I receive [tick v]\nif  then\nelse\n    if <(SCROLL_X) > [104]> then\n        set [centered? v] to [1]\n        if <(x position) > [0]> then\n            set [non_centered_x v] to [0]\n            set [centered? v] to [0]\n            change [scroll_x v] by (-8)\n        end\n        if <key (right arrow v) pressed?> then\n            change [non_centered_x v] by (8)\n        end\n        if <key (left arrow v) pressed?> then\n            change [non_centered_x v] by (-8)\n        end\n    else\n        if <<(Level) = [2]> and <(SCROLL_X) < [-1640]>> then\n            set y to (-100)\n            set [scroll_y v] to [0]\n            broadcast (Render v) and wait\n            start sound [49 - Yeah!.mp3 v]\n            switch costume to (costume31 v)\n            repeat (5)\n                next costume\n                wait (0.1) seconds\n            end\n            wait (7) seconds\n            set [level v] to [1]\n            broadcast (Hide ALL v)\n            broadcast (Fade v) and wait\n            broadcast (Cloning and Setup v)\n        else\n            set [centered? v] to [0]\n            if <<(X_Window) < [-49]> or <(X_Window) > [49]>> then\n            else\n                set x to (X_Window)\n            end\n        end\n    end\n    if <not <(Direction) = [0]>> then\n        point in direction (() - ((Direction) * (18)))\n    end\n    if <(Centered?) = [1]> then\n        set x to ((Non_Centered_X) + (X_Window))\n    end\n    if <<not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> and <(Rayman_Action) = [walk]>> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (Walk_Loop)\n    end\n    if <(Rayman_Action) = [walk]> then\n        if <(Walk_Loop) < [11]> then\n            change [walk_loop v] by (0.5)\n        else\n            set [walk_loop v] to [1]\n        end\n    else\n        if <(Rayman_Action) = [jump]> then\n            if <<(Walk_Loop) < [22]> and <(Walk_Loop) > [11]>> then\n                change [walk_loop v] by (0.5)\n            else\n                if <(Walk_Loop) = [22]> then\n                    set [walk_loop v] to [22]\n                else\n                end\n            end\n        else\n        end\n    end\n    if <(In_Mid_Air?) = [1]> then\n        change y by ((Jump_Vel) + (Collision_Y))\n    end\n    if <(In_Mid_Air?) = [0]> then\n        change y by (Collision_Y)\n    end\n    if <(y position) < [-110]> then\n        start sound [RAYCAV_0013 v]\n        set [dead? v] to [1]\n    end\nend\n\nwhen I receive [cloning and setup v]\nset [rayman_action v] to [walk]\nset [centered? v] to [0]\nset [jump_vel v] to [0]\nset [in_mid_air? v] to [1]\nset [non_centered_x v] to [0]\nset [dead? v] to [0]\nset [c v] to [0]\ngo to x: (0) y: (5)\npoint in direction (90)\nset size to (150) %\nshow\ngo to [front v] layer\n\nwhen I receive [dead v]\nswitch costume to (costume26 v)\nrepeat (4)\n    next costume\n    wait (0.1) seconds\nend\nhide\nbroadcast (Electoons Fly v) and wait\nwait until <(c) = [3]>\nbroadcast (Fade v) and wait\n\nwhen I receive [hide all v]\nhide\n\nif <(Rayman_Action) = [idle]> then\n    if <<(Walk_Loop) < [35]> and <(Walk_Loop) > [24]>> then\n        change [walk_loop v] by (0.4)\n    else\n        set [walk_loop v] to [25]\n    end\nelse\nend\n\nset [scroll_y v] to ((() - ((y position) + (100))) / (4))\n\nif <<key (up arrow v) pressed?> and <not <(In_Mid_Air?) = [1]>>> then\n    set [jump_vel v] to [15]\n    set [in_mid_air? v] to [1]\n    set [rayman_action v] to [jump]\n    set [walk_loop v] to [12]\nend\n\nset [centered? v] to [1]\nif <(x position) < [0]> then\n    set [non_centered_x v] to [0]\n    set [centered? v] to [0]\n    change [scroll_x v] by (8)\nend\nif <key (right arrow v) pressed?> then\n    change [non_centered_x v] by (8)\nend\nif <key (left arrow v) pressed?> then\n    change [non_centered_x v] by (-8)\nend\n\nwhen I receive [render v]\nset x to (X_Window)\nset y to (-100)\nswitch costume to (costume1 v)\nset [rayman_action v] to [idle]\n\n@Ting\n\ndefine Lists\ndelete (all) of [x_ting v]\ndelete (all) of [ting_count_level v]\ndelete (all) of [y_ting v]\nif <(Level) = [2]> then\n    add [-90] to [y_ting v]\n    add [100] to [x_ting v]\n    add [-90] to [y_ting v]\n    add [250] to [x_ting v]\n    add [-90] to [y_ting v]\n    add [515] to [x_ting v]\n    add [20] to [y_ting v]\n    add [675] to [x_ting v]\n    add [787] to [x_ting v]\n    add [100] to [y_ting v]\n    add [800] to [x_ting v]\n    add [75] to [y_ting v]\n    add [775] to [x_ting v]\n    add [75] to [y_ting v]\n    add [887] to [x_ting v]\n    add [100] to [y_ting v]\n    add [900] to [x_ting v]\n    add [75] to [y_ting v]\n    add [875] to [x_ting v]\n    add [75] to [y_ting v]\n    add [1000] to [x_ting v]\n    add [-90] to [y_ting v]\n    add [1100] to [x_ting v]\n    add [-90] to [y_ting v]\n    add [1200] to [x_ting v]\n    add [-90] to [y_ting v]\n    add [1400] to [x_ting v]\n    add [-90] to [y_ting v]\n    add (length of [x_ting v]) to [ting_count_level v]\nend\n\nwhen I receive [tick v]\nswitch costume to ([floor v] of ((timer) * (6)) )\ngo to x: (((SCROLL_X) + (item (Clone_N) of [x_ting v])) + (X_Window)) y: ((SCROLL_Y) + (item (Clone_N) of [y_ting v]))\nchange [timer v] by (1)\nif <touching (rayman v)?> then\n    hide\n    change [tings v] by (1)\n    start sound [RAYFIX_0005 v]\n    delete this clone\nend\n\nwhen I receive [hide all v]\nhide\n\nwhen I start as a clone\nshow\n\nwhen I receive [dead v]\ndelete this clone\n\nwhen I receive [cloning and setup v]\nhide\nset size to (150) %\ngo [backward v] (2) layers\nLists\nset [timer v] to [0]\nset [clone_n v] to [0]\nrepeat (length of [x_ting v])\n    change [clone_n v] by (1)\n    create clone of (_myself_ v)\nend\n\n@Platform_Collision\n\nwhen I receive [tick v]\nset x to (((SCROLL_X) + (X_Window)) + (Clone_Offset))\nset y to (((SCROLL_Y) + (86)) + (Y_Window))\n\ngo to [front v] layer\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [cloning and setup v]\nif <(Level) = [1]> then\n    set size to (149) %\n    show\n    set [ghost v] effect to (0)\n    clear graphic effects\n    set [x_window v] to [0]\n    set [clone_offset v] to [0]\n    set size to (149) %\n    switch costume to (l2-1 v)\n    show\n    go to x: (0) y: (0)\n    next costume\n    change [clone_offset v] by (713)\n    create clone of (_myself_ v)\n    repeat (1)\n        next costume\n        change [clone_offset v] by (713)\n        create clone of (_myself_ v)\n    end\n    switch costume to (l2-1 v)\n    set [clone_offset v] to [0]\nend\nif <(Level) = [2]> then\n    set size to (149) %\n    show\n    set [ghost v] effect to (0)\n    clear graphic effects\n    set [x_window v] to [0]\n    set [clone_offset v] to [0]\n    set size to (149) %\n    switch costume to (l1-1 v)\n    show\n    go to x: (0) y: (0)\n    next costume\n    change [clone_offset v] by (713)\n    create clone of (_myself_ v)\n    repeat (2)\n        next costume\n        change [clone_offset v] by (713)\n        create clone of (_myself_ v)\n    end\n    switch costume to (l1-1 v)\n    set [clone_offset v] to [0]\nend\n\nwhen I receive [render v]\nset x to (((SCROLL_X) + (X_Window)) + (Clone_Offset))\nset y to (((SCROLL_Y) + (86)) + (Y_Window))\n\n@Rayman_Lives\n\nwhen I receive [cloning and setup v]\nshow\nset size to (200) %\ngo to [front v] layer\ngo to x: (-140) y: (130)\ngo to x: (80) y: (130)\nswitch costume to (rayman lives2 v)\ncreate clone of (_myself_ v)\ngo to x: (-140) y: (130)\nswitch costume to (rayman lives v)\n\nwhen I receive [hide all v]\nhide\n\n@Text\n\nwhen I receive [cloning and setup v]\nshow\ngo to [front v] layer\nset [letter_offset v] to [1]\nset size to (200) %\ngo to x: (-95) y: (130)\nchange [letter_offset v] by (1)\nchange x by (25)\ncreate clone of (_myself_ v)\nset [letter_offset v] to [1]\ngo to x: (-95) y: (130)\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [tick v]\nif <(lives) < [10]> then\n    switch costume to (letter (Letter_Offset) of (join [0] (lives)))\nelse\n    switch costume to (letter (Letter_Offset) of (lives))\nend\n\nwhen I receive [hide all v]\nhide\n\n@Text_2\n\nwhen I receive [cloning and setup v]\nshow\ngo to [front v] layer\nset [letter_offset_2 v] to [1]\nset size to (200) %\ngo to x: (125) y: (130)\nchange [letter_offset_2 v] by (1)\nchange x by (25)\ncreate clone of (_myself_ v)\nset [letter_offset_2 v] to [1]\ngo to x: (125) y: (130)\n\nwhen I receive [tick v]\nif <(Tings) < [10]> then\n    switch costume to (letter (Letter_Offset_2) of (join [0] (Tings)))\nelse\n    switch costume to (letter (Letter_Offset_2) of (Tings))\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [hide all v]\nhide\n\n@Hit_Box\n\ndefine None\nshow\nif <(direction) = [1]> then\n    if <(In_Mid_Air?) = [0]> then\n        set x to (x)\n        set y to (y)\n        if <touching (platform_collision v)?> then\n        else\n            set [direction v] to [-8]\n            change [scroll_x v] by (-8)\n        end\n    else\n        set x to ([x position v] of [rayman v])\n        set y to ([y position v] of [rayman v])\n        if <touching (platform_collision v)?> then\n            set [direction v] to [8]\n            change [scroll_x v] by (8)\n        else\n            set [direction v] to [-8]\n            change [scroll_x v] by (-8)\n        end\n    end\nelse\n    if <(direction) = [2]> then\n        if <(In_Mid_Air?) = [0]> then\n            set x to (x)\n            set y to (y)\n            if <touching (platform_collision v)?> then\n            else\n                set [direction v] to [8]\n                change [scroll_x v] by (8)\n            end\n        else\n            set x to ([x position v] of [rayman v])\n            set y to ([y position v] of [rayman v])\n            if <touching (platform_collision v)?> then\n                set [direction v] to [-8]\n                change [scroll_x v] by (-8)\n            else\n                set [direction v] to [8]\n                change [scroll_x v] by (8)\n            end\n        end\n    else\n        if <(direction) = [3]> then\n            set x to (x)\n            set y to (y)\n            if <not <touching (platform_collision v)?>> then\n                if <([floor v] of (Jump_Vel) ) > [-15]> then\n                    set [jump_vel v] to ((Jump_Vel) - (1.25))\n                end\n                set [in_mid_air? v] to [1]\n            else\n                if <(Jump_Vel) > [0]> then\n                    set [jump_vel v] to [0]\n                    set [in_mid_air? v] to [1]\n                    set [jump_vel v] to ((Jump_Vel) - (1.25))\n                else\n                    if <(Rayman_Action) = [jump]> then\n                        start sound [RAYFIX_0010 v]\n                    end\n                    set [in_mid_air? v] to [0]\n                    set [rayman_action v] to [walk]\n                end\n            end\n        else\n            if <(direction) = [4]> then\n                set x to (x)\n                set y to (y)\n                if <<key (up arrow v) pressed?> and <not <<key (right arrow v) pressed?> and <key (left arrow v) pressed?>>>> then\n                    if <<not <touching (platform_collision v)?>> and <(In_Mid_Air?) = [0]>> then\n                        set [jump_vel v] to [15]\n                        set [in_mid_air? v] to [1]\n                        set [rayman_action v] to [jump]\n                        set [walk_loop v] to [12]\n                    end\n                end\n            else\n            end\n        end\n    end\nend\n\nwhen I receive [begin game v]\nhide\npoint in direction (90)\nshow\nswitch costume to (costume14 v)\nset [direction v] to [0]\nset [collision_y v] to [0]\nset [lives v] to [3]\nset [tings v] to [0]\ngo [backward v] (99999) layers\nbroadcast (Cloning and Setup v)\nforever\n    if <(Dead?) = [ 1]> then\n        broadcast (Dead v) and wait\n        go [backward v] (99999) layers\n        change [lives v] by (-1)\n        set [tings v] to [0]\n    else\n        broadcast (Tick v) and wait\n        if <<key (left arrow v) pressed?> and <(SCROLL_X) < [160]>> then\n            if <(Centered?) = [0]> then\n                Check hit (2) (([x position v] of [rayman v]) - (10)) (([y position v] of [rayman v]) + (10))\n            end\n        end\n        if <key (right arrow v) pressed?> then\n            if <(Centered?) = [0]> then\n                Check hit (1) (([x position v] of [rayman v]) + (10)) (([y position v] of [rayman v]) + (10))\n            end\n        end\n        if <key (up arrow v) pressed?> then\n        end\n        if <([abs v] of (X_Window) ) < [50]> then\n        else\n            set [direction v] to [0]\n            if <(X_Window) < [0]> then\n                set [x_window v] to [-50]\n            end\n            if <(X_Window) > [0]> then\n                set [x_window v] to [50]\n            end\n        end\n        if <not <<key (right arrow v) pressed?> and <key (left arrow v) pressed?>>> then\n            if <key (right arrow v) pressed?> then\n                set [direction v] to [-5]\n            end\n            if <key (left arrow v) pressed?> then\n                set [direction v] to [5]\n            end\n        else\n            set [direction v] to [0]\n        end\n        if <key (up arrow v) pressed?> then\n        end\n        if <<(In_Mid_Air?) = [1]> or <not <touching (platform_collision v)?>>> then\n            Check hit (3) ([x position v] of [rayman v]) (([y position v] of [rayman v]) - (10))\n        end\n        if <key (up arrow v) pressed?> then\n            Check hit (4) ([x position v] of [rayman v]) (([y position v] of [rayman v]) + (10))\n        end\n        change [x_window v] by (Direction)\n    end\n    set [scroll_y v] to (((-20) - ((y position) + (100))) / (4))\nend\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [cloning and setup v]\ngo [backward v] (99999) layers\n\nif <touching (platform_collision v)?> then\n    set [collision_y v] to [0]\nelse\n    set [collision_y v] to [2]\nend\n\nif <((() - ((y position) + (100))) / (4)) < [0]> then\nelse\n    set [scroll_y v] to [-]\nend\n\nif <(In_Mid_Air?) = [0]> then\n    if <(y position) < (SCROLL_Y)> then\n        change [scroll_y v] by (-1)\n    end\nend\n\nset y to ((y) - (15))\nif <touching (platform_collision v)?> then\n    set [collision_y v] to [0]\nelse\n    set [collision_y v] to [2]\nend\n\nset y to ((y) - (15))\nif <touching (platform_collision v)?> then\n    set [collision_y v] to [0]\nelse\n    set [collision_y v] to [2]\nend\n\n@JUNF2-LAYERS\n\nwhen I receive [tick v]\nif <(Level) = [2]> then\n    hide\nelse\n    show\n    go to x: ((((SCROLL_X) + (X_Window)) / (2)) mod (620)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\nwhen I receive [cloning and setup v]\ngo [backward v] (10) layers\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [render v]\nif <(Level) = [2]> then\n    hide\nelse\n    show\n    go to x: ((((SCROLL_X) + (X_Window)) / (2)) mod (620)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\n@Ting2\n\ndefine Lists\ndelete (all) of [a_flower_x v]\ndelete (all) of [a_flower_y v]\nif <(Level) = [2]> then\n    add [200] to [a_flower_x v]\n    add [-100] to [a_flower_y v]\n    add [75] to [a_flower_y v]\n    add [890] to [a_flower_x v]\nend\n\nwhen I receive [tick v]\nswitch costume to ([floor v] of ((timer) * (5)) )\ngo to x: (((SCROLL_X) + (item (Clone_N_3) of [a_flower_x v])) + (X_Window)) y: ((SCROLL_Y) + (item (Clone_N_3) of [a_flower_y v]))\n\nwhen I receive [cloning and setup v]\nhide\nset size to (150) %\nLists\ngo [backward v] (2) layers\nset [timer v] to [0]\nset [clone_n_3 v] to [0]\nrepeat (length of [a_flower_x v])\n    change [clone_n_3 v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [hide all v]\nhide\n\nwhen I start as a clone\nshow\n\n@Sprite1\n\nwhen I receive [electoons fly v]\nset [c v] to [0]\ngo to (rayman v)\nrepeat (3)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to x: (([x position v] of [rayman v]) + (pick random (-50) to (50))) y: ([y position v] of [rayman v])\nshow\nstart sound [RAYFIX_0020 v]\nrepeat (round ((155) + ([y position v] of [rayman v])))\n    change y by (10)\nend\nhide\nwait (1) seconds\nchange [c v] by (1)\ndelete this clone\n\nwhen I receive [cloning and setup v]\nhide\nset size to (150) %\ndelete this clone\n\nwhen I receive [hide all v]\nhide\n\nif <([y position v] of [rayman v]) < [0]> then\n    change y by (round (([abs v] of (([y position v] of [rayman v]) + (180)) ) / (10)))\nelse\nend\n\n@Sprite2\n\nwhen I receive [cloning and setup v]\nset size to (100) %\nclear graphic effects\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [fade v]\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (Hide ALL v) and wait\ngo to [front v] layer\nbroadcast (Cloning and Setup v)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@antitoon\n\nhide\n\nforever\n    next costume\n    wait (0.075) seconds\nend\n\nadd [thing] to [antitoon_y v]\n\nwhen I receive [cloning and setup v]\nset size to (175) %\nhide\n\ndefine Lists\nadd [-300] to [antitoon_spawn_x v]\nadd [300] to [antitoon_x movement v]\nadd [-140] to [antitoon_y v]\n\nwhen I start as a clone\nshow\ngo to [front v] layer\n\ndelete (Index) of [antitoon_y v]\n\nwhen I receive [tick v]\n\ndefine Spawn New Enimes\nset [index v] to [0]\nif <not <(length of [antitoon_spawn_x v]) = [0]>> then\n    repeat (length of [antitoon_spawn_x v])\n        change [index v] by (1)\n        if <(item (Index) of [antitoon_spawn_x v]) > (SCROLL_X)> then\n            create clone of (_myself_ v)\n            delete (Index) of [antitoon_spawn_x v]\n            stop [this script v]\n        end\n    end\nend\n\ndelete (all) of [antitoon_spawn_x v]\ndelete (all) of [antitoon_y v]\ndelete (all) of [antitoon_x movement v]\nLists\n\nSpawn New Enimes\ngo to x: (((item (Index) of [antitoon_x movement v]) + (SCROLL_X)) + (X_Window)) y: ((item (Index) of [antitoon_y v]) + (SCROLL_Y))\n\n@Sprite4\n\nwhen flag clicked\nset [level v] to [2]\ngo to [front v] layer\nbroadcast (Hide ALL v) and wait\nset [ghost v] effect to (100)\nclear graphic effects\ngo to x: (0) y: (0)\nswitch backdrop to (1 v)\nshow\nswitch costume to (costume2 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (0.1) seconds\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\ngo to [front v] layer\nbroadcast (Begin Game v)\ngo to [front v] layer\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [brightness v] effect by (10)\nend\n\nwhen I receive [end fade v]\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (costume3 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (10) seconds\nswitch costume to (costume1 v)\nstop [all v]\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [begin game v]\nshow\n\nwhen I receive [cloning and setup v]\nshow\n\n@dosbox-2012-11-24-21-16-18-50\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [tick v]\nif <(Level) = [1]> then\n    show\n    go to x: (((SCROLL_X) + (X_Window)) + (800)) y: (([sin v] of ((Timer) * (2)) ) * (20))\n    if <(SCROLL_X) < [-640]> then\n        wait (1) seconds\n        repeat (17)\n            change [x_window v] by (-5)\n            broadcast (Render v) and wait\n            wait (0.05) seconds\n        end\n        broadcast (Bettila Words v) and wait\n    end\nelse\n    hide\nend\n\nwhen I receive [cloning and setup v]\nshow\n\nwhen I receive [render v]\ngo to x: (((SCROLL_X) + (X_Window)) + (800)) y: (([sin v] of ((Timer) * (2)) ) * (20))\n\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@JUNF2-LAYERS3\n\nwhen I receive [tick v]\nif <(Level) = [2]> then\n    hide\nelse\n    show\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (620)) - (600)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\nwhen I receive [cloning and setup v]\ngo [backward v] (10) layers\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [render v]\nif <(Level) = [2]> then\n    hide\nelse\n    show\n    go to x: (((((SCROLL_X) + (X_Window)) / (2)) mod (620)) - (600)) y: (((SCROLL_Y) + (Y_Window)) / (2))\nend\n\n@Clouds\n\nwhen I receive [cloning and setup v]\ngo [backward v] (20) layers\n\nwhen I receive [tick v]\nif <(Level) = [2]> then\n    hide\nelse\n    go to x: (((((SCROLL_X) + (X_Window)) / (4)) - ((Timer) / (2))) mod (480)) y: (0)\n    show\nend\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [render v]\nif <(Level) = [2]> then\n    hide\nelse\n    go to x: (((((SCROLL_X) + (X_Window)) / (4)) - ((Timer) / (2))) mod (480)) y: (0)\n    show\nend\n\n@Clouds2\n\nwhen I receive [cloning and setup v]\ngo [backward v] (20) layers\n\nwhen I receive [tick v]\nif <(Level) = [2]> then\n    hide\nelse\n    go to x: ((((((SCROLL_X) + (X_Window)) / (4)) - ((Timer) / (2))) mod (480)) - (480)) y: (0)\n    show\nend\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [render v]\nif <(Level) = [2]> then\n    hide\nelse\n    go to x: ((((((SCROLL_X) + (X_Window)) / (4)) - ((Timer) / (2))) mod (480)) - (480)) y: (0)\n    show\nend\n\n@Sprite5\n\nwhen I receive [bettila words v]\nset size to (125) %\nshow\ngo to [front v] layer\nswitch costume to (text_1 v)\ngo [backward v] (1) layers\ngo to x: (25) y: (-100)\nrepeat (10)\n    wait (0.05) seconds\n    change y by (5)\nend\nrepeat until <key (space v) pressed?>\n    change [timer v] by (1)\n    broadcast (Render v) and wait\nend\ncreate clone of (_myself_ v)\nnext costume\nrepeat (100)\n    change [timer v] by (1)\n    broadcast (Render v) and wait\nend\nhide\nbroadcast (Hide ALL v) and wait\nbroadcast (End Fade v) and wait\n\nwhen I start as a clone\ngo to [front v] layer\nrepeat (10)\n    wait (0.05) seconds\n    change y by (-5)\nend\ndelete this clone\n\nwait (100) seconds\n\nwait until <key (space v) pressed?>\n\nwhen flag clicked\ngo to x: (25) y: (-100)\nhide\n\n
Up = Jump\nLeft = Walk Left\nRight = Walk Right\nSpace = Continue (I add punching and enemies later)\n==================================================\nThis is a re-creation of the game Rayman for the PS1/Sega Saturn I have created purely because of nostalgia.  \nRayman was a platform game released in 1995 by Ubisoft. You probably recognize this game from It's newer titles - Rayman Origins and Legends. This is a demo and will be pretty easy to fly through, so if you enjoy- please like or favorite and I will produce more content like this. 