ADVENTURE 3 \Temple/ <a platformer> 


@Stage\n\nwhen flag clicked\nforever\n    play sound [Jaymes-Young-Infinity- v] until done\nend\n\nwhen flag clicked\nforever\n    if <<(current [hour v]) > [20]> and <(current [hour v]) < [7]>> then\n        set [brightness v] effect to (-60)\n    end\n    if <<(current [hour v]) > [7]> and <(current [hour v]) < [12]>> then\n        set [brightness v] effect to (0)\n    end\n    if <<(current [hour v]) > [12]> and <(current [hour v]) < [20]>> then\n        set [brightness v] effect to (-50)\n    end\nend\n\nwhen flag clicked\n\n@Plateforme \n\nwhen I receive [niveau  v]\nchange [niveau v] by (1)\nnext costume\n\nwhen flag clicked\nhide\nset [niveau v] to [1]\n\nwhen I receive [start  v]\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\nshow\ngo to [front v] layer\nswitch costume to (costume 1 v)\ngo to [front v] layer\ngo to [back v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\n\n@Player \n\nwhen I receive [niveau  v]\ngo to x: (-200) y: (-60)\n\nwhen flag clicked\nset [mort v] to [0]\nhide\n\nwhen I receive [mort v]\ngo to x: (-200) y: (-70)\nchange [mort v] by (1)\n\nwhen I receive [start  v]\nset rotation style [left-right v]\nshow\ngo to x: (-208) y: (48)\nset size to (15) %\nforever\n    go to [front v] layer\n    set [player x v] to [0]\n    set [player y v] to [0]\n    forever\n        change [player y v] by (-1)\n        set [player x v] to ((player X) * (0.9))\n        if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            point in direction (90)\n            change [player x v] by (1)\n        end\n        if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            point in direction (-90)\n            change [player x v] by (-1)\n        end\n        change x by (player X)\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (1)\n        end\n        if  then\n            change y by (-4)\n            change x by ((player X) * (-1))\n            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                set [player y v] to [10]\n                if <([abs v] of (player X) ) = (player X)> then\n                    set [player x v] to [-4]\n                else\n                    set [player x v] to [4]\n                end\n            else\n                set [player x v] to [0]\n            end\n        end\n        change y by (Player Y)\n        if <touching (plateforme  v)?> then\n            change y by ((Player Y) - ((Player Y) * (2)))\n            set [player y v] to [0]\n        end\n        change y by (-1)\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (plateforme  v)?>> then\n            change [player y v] by (14)\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [-180]> then\n        broadcast (Mort v)\n        wait until <not <(y position) = [-180]>>\n    end\nend\n\nwhen flag clicked\nswitch costume to (pick random (1) to (2))\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (5)\n    set [brightness v] effect to (-100)\n    change [ghost v] effect by (20)\n    change size by (-2)\nend\ndelete this clone\n\nwait (0.) seconds\n\nwhen I receive [teleportation  v]\nchange [brightness v] effect by (100)\ngo to (drapeau bleu 2 v)\nclear graphic effects\n\nwhen I receive [teleportation 2 v]\ngo to (drapeau jaune 2 v)\nchange y by (-20)\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\nshow\nswitch costume to (level 1  v)\ngo to x: (-45) y: (-14)\nforever\n    if <touching (player  v)?> then\n        broadcast (Mort v)\n        wait until <not <touching (player  v)?>>\n    end\nend\n\nwhen flag clicked\nbroadcast (Start  v)\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n\nwait (1) seconds\n\nwhen flag clicked\nforever\n    if <(Niveau) = [10]> then\n        repeat (10)\n            change y by (-3)\n        end\n        wait (0.25) seconds\n        repeat (10)\n            change y by (3)\n        end\n    end\nend\n\n@drapeau de fin \n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (6) layers\n    if <touching (player  v)?> then\n        broadcast (niveau + v)\n        wait until <not <touching (player  v)?>>\n    end\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\nbroadcast (Niveau  v)\n\n@drapeau bleu\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (6) layers\n    if <touching (player  v)?> then\n        broadcast (teleportation  v)\n        wait until <not <touching (player  v)?>>\n    end\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\n@drapeau bleu 2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (6) layers\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Niveau) = [1]> then\n        go to x: (100) y: (178)\n    end\n    if <(Niveau) = [2]> then\n        go to x: (201) y: (174)\n    end\n    if <(Niveau) = [3]> then\n        go to x: (185) y: (174)\n    end\n    if <(Niveau) = [5]> then\n        go to x: (185) y: (174)\n    end\n    if <(Niveau) = [4]> then\n        go to x: (185) y: (174)\n    end\n    if <(Niveau) = [6]> then\n        go to x: (51) y: (170)\n    end\n    if <(Niveau) = [10]> then\n        go to x: (191) y: (170)\n    end\nend\n\nif <touching (player  v)?> then\n    broadcast (Niveau  v)\n    wait until <not <touching (player  v)?>>\nend\n\n@lave  et scie\n\nwhen flag clicked\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\nhide\nswitch costume to (costume1 v)\nswitch costume to (costume1 v)\nforever\n    if <touching (player  v)?> then\n        broadcast (Mort v)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\nforever\n    if <(Niveau) = [4]> then\n        point in direction (90)\n        show\n        set [lava x v] to [0]\n        wait (0.25) seconds\n        repeat (6)\n            change [lava x v] by (-5)\n            wait (0.1) seconds\n        end\n        wait (0.5) seconds\n        repeat (6)\n            change [lava x v] by (5)\n            wait (0.1) seconds\n        end\n    end\n    if <(Niveau) = [7]> then\n        show\n        set [lava x v] to [-110]\n        turn right (6) degrees\n    end\n    if <(Niveau) = [8]> then\n        show\n        point in direction (90)\n        set [lava x v] to [-203]\n        wait (0.25) seconds\n        repeat (6)\n            change [lava x v] by (-5)\n            wait (0.1) seconds\n        end\n        wait (0.5) seconds\n        repeat (6)\n            change [lava x v] by (5)\n            wait (0.1) seconds\n        end\n    end\nend\n\npoint in direction (90)\n\nwait (0.25) seconds\n\nshow\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nset [lava x v] to [0]\nforever\n    set y to (lava x)\nend\n\nwhen flag clicked\nforever\n    set [scie v] to [3]\nend\n\n@drapeau jaune\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (6) layers\n    if <touching (player  v)?> then\n        broadcast (teleportation 2 v)\n        wait until <not <touching (player  v)?>>\n    end\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\n@drapeau jaune 2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (6) layers\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Niveau) = [1]> then\n    if <(Niveau) = [2]> then\n    if <(Niveau) = [3]> then\n    if <(Niveau) = [4]> then\n    if <(Niveau) = [5]> then\n        go to x: (111) y: (32)\n    end\n    if <(Niveau) = [6]> then\n        go to x: (195) y: (174)\n    end\n    if <(Niveau) = [3]> then\n    if <(Niveau) = [10]> then\n        go to x: (174) y: (-13)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\ngo to [front v] layer\nhide\nswitch costume to (nexte level v)\npoint in direction (90)\nset size to (100) %\ngo to x: (0) y: (0)\n\nwhen I receive [niveau + v]\nhide\nshow\ngo to x: (-500) y: (0)\nglide (0.5) secs to x: (0) y: (0)\nwait (1) seconds\nbroadcast (Niveau  v)\nglide (0.5) secs to x: (500) y: (0)\ngo to x: (-500) y: (0)\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\nset [ghost v] effect to (100)\n\n@Sprite2\n\nwhen I receive [start  v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <(Niveau) = [10]> then\n        go to x: (0) y: (0)\n        repeat (10)\n            change y by (-10)\n        end\n        wait (1) seconds\n        repeat (10)\n            change y by (10)\n        end\n    end\nend\n\nwhen I receive [niveau  v]\nnext costume\n\nwhen I receive [start  v]\nshow\nswitch costume to (costume1 v)\ngo to x: (-45) y: (-14)\nforever\n    if <touching (player  v)?> then\n        broadcast (Mort v)\n        wait until <not <touching (player  v)?>>\n    end\nend\n\n@Thum\n\nwhen flag clicked\ngo to x: (800) y: (0)\nswitch costume to (costume2 v)\nset [ghost v] effect to (0)\nwait (0.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.0001)\nrepeat (10)\n    change [ghost v] effect by (-100)\nend\n\nwhen [timer v] > (0.0001)\nglide (0.5) secs to x: (0) y: ()\n\nchange y by (10)\n\ngo to x: (0) y: (180)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\nend\n\n