home *** CD-ROM | disk | FTP | other *** search
Wrap
if(startup == null) { startx = _X + 1; startup = "done"; } if(eval("_root.codeMC:colourActive") == "purple" or eval("_root.codeMC:purpleSwitch") == "on") { if(_X < startx) { direction = 2; } if(_X > startx + 100) { direction = -2; } _X = _X + direction; } if(getProperty("_root.BackgroundMC", _X) + _X > 0 and getProperty("_root.BackgroundMC", _X) + _X < 450 and getProperty("_root.BackgroundMC", _Y) + _Y > 0 and getProperty("_root.BackgroundMC", _Y) + _Y < 300) { if(eval("_root.codeMC:state") != "dead") { range = 10; if(getProperty("_root.playerMC", _Y) > _Y + getProperty("_root.BackgroundMC", _Y) - range and getProperty("_root.playerMC", _Y) < _Y + getProperty("_root.BackgroundMC", _Y) + range) { inRange = "on"; } else { inrange = "off"; } if(getProperty("_root.playerMC", _Y) < _Y + getProperty("_root.BackgroundMC", _Y) and getProperty("_root.playerMC", _Y) + eval("_root.CodeMC:fallspeed") > _Y + getProperty("_root.BackgroundMC", _Y)) { yCollision = "on"; } else { yCollision = "off"; } if(getProperty("_root.playerMC", _X) > _X + getProperty("_root.BackgroundMC", _X) and getProperty("_root.playerMC", _X) < _X + _width + getProperty("_root.BackgroundMC", _X)) { xCollision = "on"; } else { xCollision = "off"; } if(inRange == "on" and xCollision == "on") { if(collision != "on") { set("_root.CodeMC:platformActive",eval("_root.CodeMC:platformActive") + 1); } collision = "on"; set("_root.CodeMC:currentGround",_Y + getProperty("_root.BackgroundMC", _Y)); setProperty("_root.playerMC", _Y, _Y + getProperty("_root.BackgroundMC", _Y)); if(eval("_root.codeMC:colourActive") == "purple" or eval("_root.codeMC:purpleSwitch") == "on") { if(getProperty("_root.playerMC", _X) > eval("_root.codeMC:scrollPoint") and direction == 2 or getProperty("_root.playerMC", _X) < eval("_root.codeMC:scrollPointLeft") and direction == -2) { if(getProperty("_root.playerMC", _X) > eval("_root.codeMC:scrollPoint") and direction == 2) { setProperty("_root.backgroundMC", _X, getProperty("_root.backgroundMC", _X) - direction); } if(getProperty("_root.playerMC", _X) < eval("_root.codeMC:scrollPointLeft") and direction == -2) { setProperty("_root.backgroundMC", _X, getProperty("_root.backgroundMC", _X) - direction); } } else { setProperty("_root.PlayerMC", _X, getProperty("_root.PlayerMC", _X) + direction); } } } else if(collision == "on") { if(inRange == "off" or xCollision == "off") { set("_root.CodeMC:platformActive",eval("_root.CodeMC:platformActive") - 1); collision = "off"; } } } }