Rainforest (Mobile Friendly) | Platformer | #Games


@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [start finish v]\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nset volume to (100) %\nstart sound [afterinfinity try again v]\n\nwhen I receive [start finish v]\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\nwait (0.1) seconds\nset volume to (100) %\nforever\n    play sound [Unity v] until done\nend\n\nwhen I receive [i won v]\nset volume to (50) %\n\n@Intro2\n\nwhen flag clicked\nhide\ngo to x: (237) y: (-21)\n\nwhen I receive [show p v]\nshow\nglide (0.1) secs to x: (191) y: (-24)\n\nwhen I receive [start finish v]\nhide\n\n@loader\n\nwhen I receive [show p v]\nwait (0.1) seconds\nshow\nwait (pick random (3) to (5)) seconds\nbroadcast (start finish v)\nhide\n\nwhen flag clicked\nhide\n\n@Platform\n\nwhen flag clicked\nswitch costume to (platform1 v)\nhide\n\nwhen I receive [start finish v]\nshow\n\nwhen I receive [switch backdrop v]\nnext costume\nbroadcast (finish v)\nwait (1) seconds\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform3]> then\n        broadcast (spike come v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform4]> then\n        broadcast (spike2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform6]> then\n        broadcast (spike3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform8]> then\n        broadcast (spike4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform9]> then\n        broadcast (spike5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform10]> then\n        broadcast (3spikes v)\n    end\nend\n\nwhen I receive [i won v]\nhide\n\nwhen I receive [project page v]\nhide\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform2]> then\n        broadcast (bounce v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform5]> then\n        broadcast (spike lvl hard v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform7]> then\n        broadcast (new block v)\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform11]> then\n        broadcast (almost winning v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Platform12]> then\n        broadcast (win v)\n    end\nend\n\n@Player\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Sidemovmentspeed: (side movment) Friction: (friction) Slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y velocity)\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        change y by ((([abs v] of (Y velocity) ) / (Y velocity)) * (-1))\n    end\n    set [y velocity v] to (<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <(([abs v] of (Y velocity) ) / (Y velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X velocity) + ((<<key (a v) pressed?> or <key (left arrow v) pressed?>> * ((side movment) * (-1))) + (<<key (d v) pressed?> or <key (right arrow v) pressed?>> * (side movment)))) * (friction))\nchange x by (X velocity)\nset [slope v] to [0]\nrepeat until <<(slope) = ((slope) * (-1))> or <not <<touching (platform v)?> or <touching color (#ffe200)?>>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (platform v)?> then\n    change y by (slope)\n    repeat until <not <<touching (platform v)?> or <touching color (#ffe200)?>>>\n        change x by ((([abs v] of (X velocity) ) / (X velocity)) * (-1))\n    end\nend\n\nwhen flag clicked\nswitch costume to (player v)\nreset timer\nset size to (100) %\nhide\nset [time v] to [0]\nset [win v] to [0]\nhide variable [time v]\n\nwhen I receive [start finish v]\nshow\ngo to x: (-203) y: (0)\nset [y velocity v] to [0]\n\nwhen flag clicked\nset [ghost v] effect to (30)\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (97) %\nset [ghost v] effect to (50)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-2)\n    change [color v] effect by (20)\n    change [brightness v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<touching (green-flag v)?> or <touching (green-flag2 v)?>> then\n        go to x: (-203) y: (0)\n        wait (0.01) seconds\n        broadcast (switch backdrop v)\n    end\nend\n\nwhen I receive [dead v]\ngo to x: (-203) y: (0)\nset size to (100) %\n\nwhen I receive [project page v]\nhide\n\nwhen [r v] key pressed\ngo to x: (-203) y: (0)\nset size to (100) %\n\nwhen I receive [start finish v]\nforever\n    if <touching color (#00d2ff)?> then\n        Platform Gravity: [-1] Jump Height: [20] Sidemovmentspeed: [3] Friction: [.7] Slope: [8]\n    else\n        Platform Gravity: [-1] Jump Height: [15] Sidemovmentspeed: [3] Friction: [.7] Slope: [8]\n    end\nend\n\nwhen I receive [win v]\nwait (0.02) seconds\nforever\n    if <touching (green-flag2 v)?> then\n        broadcast (i won v)\n    end\nend\n\nwhen I receive [i won v]\nhide\nswitch costume to (hidden player v)\nset [time v] to (timer)\nshow variable [time v]\nstop [all v]\n\n@text\n\nwhen flag clicked\nhide\n\nwhen I receive [start finish v]\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [switch backdrop v]\nnext costume\n\nwhen I receive [i won v]\nhide\n\nwhen I receive [project page v]\nhide\n\nwhen I receive [i won v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [i won v]\nshow\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (spike 1 v)\nhide\n\nwhen I receive [spike come v]\nswitch costume to (spike1 v)\ngo to x: (6) y: (-122)\nshow\n\nwhen I receive [spike2 v]\nswitch costume to (spike2 v)\ngo to x: (6) y: (-122)\n\nwhen I receive [spike3 v]\nswitch costume to (spike 1 v)\ngo to x: (57) y: (67)\ngo to [back v] layer\n\nwhen I receive [spike4 v]\nswitch costume to (spike6 v)\ngo to x: (59) y: (-73)\n\nwhen I receive [spike5 v]\nswitch costume to (spike7 v)\ngo to x: (59) y: (-73)\ngo to [back v] layer\n\nwhen I receive [new block v]\nswitch costume to (spike5 v)\ngo to x: (29) y: (-123)\n\nwhen I receive [i won v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (dead v)\n    end\nend\n\nwhen I receive [spike lvl hard v]\nswitch costume to (spike3 v)\ngo to x: (6) y: (-122)\n\nwhen I receive [spike3 v]\nswitch costume to (spike4 v)\ngo to x: (28) y: (-123)\n\nwhen I receive [3spikes v]\nswitch costume to (spike8 v)\ngo to x: (59) y: (-73)\ngo to [back v] layer\n\nwhen I receive [almost winning v]\nswitch costume to (spike9 v)\ngo to x: (59) y: (-73)\ngo to [back v] layer\n\nwhen I receive [win v]\nswitch costume to (spike10 v)\ngo to x: (59) y: (-73)\ngo to [back v] layer\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nwhen I receive [i won v]\ngo to x: (86) y: (-86)\nshow\n\n@Intro\n\nwhen flag clicked\nshow\nchange [ghost v] effect by (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nbroadcast (show P v)\n\nwhen I receive [start finish v]\nhide\n\n@green-flag\n\nwhen I receive [switch backdrop v]\ngo to x: (179) y: (46)\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (212) y: (-127)\nhide\n\nwhen I receive [start finish v]\nshow\n\nwhen I receive [spike2 v]\ngo to x: (215) y: (-128)\n\nwhen I receive [spike come v]\ngo to x: (220) y: (-122)\n\nwhen I receive [spike lvl hard v]\ngo to x: (219) y: (62)\n\nwhen I receive [spike3 v]\ngo to x: (219) y: (12)\n\nwhen I receive [new block v]\ngo to x: (218) y: (-110)\n\nwhen I receive [spike4 v]\ngo to x: (195) y: (-40)\n\nwhen I receive [spike5 v]\ngo to x: (141) y: (133)\n\nwhen I receive [3spikes v]\ngo to x: (215) y: (-126)\n\nwhen I receive [almost winning v]\ngo to x: (190) y: (127)\n\nwhen I receive [win v]\nbroadcast (debug v)\nhide\n\nwhen I receive [i won v]\nhide\n\nwhen I receive [project page v]\nhide\n\n@bounce pad\n\nwhen flag clicked\nhide\n\nwhen I receive [spike2 v]\ngo to x: (-53) y: (-152)\nshow\n\nwhen I receive [spike come v]\nhide\n\nwhen I receive [bounce v]\ngo to [front v] layer\nswitch costume to (long v)\ngo to x: (-10) y: (-153)\nshow\n\nwhen I receive [spike lvl hard v]\nswitch costume to (short v)\ngo to x: (53) y: (-45)\nshow\n\nwhen I receive [spike3 v]\nswitch costume to (long v)\nhide\n\nwhen I receive [new block v]\nswitch costume to (extra long v)\ngo to x: (12) y: (-150)\ngo to [back v] layer\nshow\n\nwhen I receive [spike4 v]\nhide\n\nwhen I receive [3spikes v]\ngo to [front v] layer\nswitch costume to (medium v)\ngo to x: (-20) y: (-149)\nshow\n\nwhen I receive [almost winning v]\nswitch costume to (last v)\ngo to x: (86) y: (-100)\n\nwhen I receive [i won v]\nhide\n\nwhen I receive [win v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [new block v]\ngo to x: (9) y: (146)\nshow\n\nwhen I receive [spike4 v]\nhide\n\n@green-flag2\n\nwhen flag clicked\nhide\n\nwhen I receive [debug v]\ngo to x: (111) y: (-59)\nshow\n\nwhen I receive [i won v]\nhide\n\n@Player2\n\nwhen flag clicked\nset size to (20) %\nhide\n\nwhen I receive [i won v]\ngo to x: (50) y: (-105)\nshow\n\n