スケルトンアックスMC

座標から方向を取得するため、書き換えが必要に。
ちょっと手間取ってます。
しばらく記述載せてなかったんで、旧スケルトンアックスMCのスクリプト載せときますネ。
if文サイコー
—-
onClipEvent (load) {
HP = 10;
attack_direction = “none”;
dead_direction = “none2”;
nockback_direction = “none3”;
attack_direction_hit = “hit”;
//
}
onClipEvent (enterFrame) {
if (HP>1 && HP<10) { rad = Math.atan2(this._parent.deathknight._y-this._y, this._parent.deathknight._x-this._y); enemy_rotations = rad*180/Math.PI; } } onClipEvent (enterFrame) { if (HP>0) {
if (this.hitTest(this._parent.deathknight.attack_top.hitter)) {
this._parent.chatbox.supermes += “スケルトンアックスに(ダメージ表示)のダメージを与えました。”+”r”;
this._parent.chatbox.supermes.scroll += 2;
HP -= 2;
attack_direction = “attackbottom”;
dead_direction = “deadbottom”;
nockback_direction = “nockbackbottom”;
} else if (this.hitTest(this._parent.deathknight.attack_bottom.hitter)) {
this._parent.chatbox.supermes += “スケルトンアックスに(ダメージ表示)のダメージを与えました。”+”r”;
this._parent.chatbox.supermes.scroll += 2;
HP -= 2;
attack_direction = “attacktop”;
dead_direction = “deadtop”;
nockback_direction = “nockbacktop”;
} else if (this.hitTest(this._parent.deathknight.attack_left.hitter)) {
this._parent.chatbox.supermes += “スケルトンアックスに(ダメージ表示)のダメージを与えました。”+”r”;
this._parent.chatbox.supermes.scroll += 2;
HP -= 2;
attack_direction = “attackright”;
dead_direction = “deadright”;
nockback_direction = “nockbackright”;
} else if (this.hitTest(this._parent.deathknight.attack_right.hitter)) {
this._parent.chatbox.supermes += “スケルトンアックスに(ダメージ表示)のダメージを与えました。”+”r”;
this._parent.chatbox.supermes.scroll += 2;
HP -= 2;
attack_direction = “attackleft”;
dead_direction = “deadleft”;
nockback_direction = “nockbackleft”;
}
}
}
onClipEvent (enterFrame) {
if (HP<1) { HP = "dead_delay"; } else if (HP == "dead_delay") { this._parent.chatbox.supermes += "スケルトンアックスを倒しました。“+”r”;
this._parent.chatbox.supermes += “アデナ(数)、EXP(数)を取得。“+”r”;
this._parent.chatbox.supermes.scroll += 2;
this._parent.state_box.PlayerNowEXP += 10.5;
HP = “mobdead”;
}
}
onClipEvent (enterFrame) {
if (HP>1 && HP<9) { if (attack_direction == "attackbottom") { this.gotoAndStop("attack_bottom"); if (attack_direction_hit == "hit") { this._parent.enemy_attack_hit._x = this._x; this._parent.enemy_attack_hit._y = this._y; this._parent.enemy_attack_hit.gotoAndPlay("hit_bottom_f"); attack_direction_hit = "hitted"; attack_direction = "bottom"; } if (attack_direction == "bottom") { if (_parent.deathknight.PlayerHP<=0) { this.gotoAndStop("stand_bottom"); } else { attack_direction = "attackbottom"; } } } else if (attack_direction == "attacktop") { this.gotoAndStop("attack_top"); if (attack_direction_hit == "hit") { this._parent.enemy_attack_hit._x = this._x; this._parent.enemy_attack_hit._y = this._y; this._parent.enemy_attack_hit.gotoAndPlay("hit_top_f"); attack_direction_hit = "hitted"; attack_direction = "top"; } if (attack_direction == "top") { if (_parent.deathknight.PlayerHP<=0) { this.gotoAndStop("stand_top"); } else { attack_direction = "attacktop"; } } } else if (attack_direction == "attackright") { this.gotoAndStop("attack_right"); if (attack_direction_hit == "hit") { this._parent.enemy_attack_hit._x = this._x; this._parent.enemy_attack_hit._y = this._y; this._parent.enemy_attack_hit.gotoAndPlay("hit_right_f"); attack_direction_hit = "hitted"; attack_direction = "right"; } if (attack_direction == "right") { if (_parent.deathknight.PlayerHP<=0) { this.gotoAndStop("stand_right"); } else { attack_direction = "attackright"; } } } else if (attack_direction == "attackleft") { this.gotoAndStop("attack_left"); if (attack_direction_hit == "hit") { this._parent.enemy_attack_hit._x = this._x; this._parent.enemy_attack_hit._y = this._y; this._parent.enemy_attack_hit.gotoAndPlay("hit_left_f"); attack_direction_hit = "hitted"; attack_direction = "left"; } if (attack_direction == "left") { if (_parent.deathknight.PlayerHP<=0) { this.gotoAndStop("stand_left"); } else { attack_direction = "attackleft"; } } } } } onClipEvent (enterFrame) { if (HP !== "dead_delay") { if (HP !== "mobdead") { if (nockback_direction == "nockbackbottom") { this.gotoAndStop("nockback_bottom"); nockback_direction = "none3"; } else if (nockback_direction == "nockbacktop") { this.gotoAndStop("nockback_top"); nockback_direction = "none3"; } else if (nockback_direction == "nockbackright") { this.gotoAndStop("nockback_right"); nockback_direction = "none3"; } else if (nockback_direction == "nockbackleft") { this.gotoAndStop("nockback_left"); nockback_direction = "none3"; } } } } onClipEvent (enterFrame) { if (HP == "mobdead") { if (dead_direction == "deadbottom") { this.gotoAndStop("dead_bottom"); } else if (dead_direction == "deadtop") { this.gotoAndStop("dead_top"); } else if (dead_direction == "deadright") { this.gotoAndStop("dead_right"); } else if (dead_direction == "deadleft") { this.gotoAndStop("dead_left"); } } }

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>