home *** CD-ROM | disk | FTP | other *** search
- if("0" < eval("/:p2b"))
- {
- radius1 = getProperty("/hit2", _width) / "2";
- radius2 = getProperty("/block1", _width) / "2";
- obj1_x = getProperty("/hit2", _X);
- obj2_x = getProperty("/block1", _X);
- delta_x = obj1_x - obj2_x;
- obj1_y = getProperty("/hit2", _Y);
- obj2_y = getProperty("/block1", _Y);
- delta_y = obj1_y - obj2_y;
- if((radius1 + radius2) * (radius1 + radius2) >= delta_x * delta_x + delta_y * delta_y)
- {
- setProperty("/hit2", _Y, "0");
- if("0" < eval("/:supercount"))
- {
- set("/:supercount",eval("/:supercount") - "1");
- }
- if(eval("/:epunch") == "0")
- {
- tellTarget("/p")
- {
- gotoAndStop("hit4");
- play();
- }
- set("/:p1b",eval("/:p1b") - (random("5") + "6"));
- set("/:pl2",eval("/:pl2") + "1");
- setProperty("/ouch", _visible, "1");
- }
- if(eval("/:epunch") == "1")
- {
- tellTarget("/p")
- {
- gotoAndStop("hitl");
- play();
- }
- set("/:p1b",eval("/:p1b") - (random("5") + "2"));
- set("/:pl2",eval("/:pl2") + "1");
- setProperty("/ouch", _visible, "1");
- }
- if(eval("/:epunch") == "2")
- {
- tellTarget("/p")
- {
- gotoAndStop("hitr");
- play();
- }
- set("/:p1b",eval("/:p1b") - (random("5") + "3"));
- set("/:pl2",eval("/:pl2") + "1");
- setProperty("/ouch", _visible, "1");
- }
- }
- else
- {
- setProperty("/ouch", _visible, "0");
- }
- }
-