LoginSignup
0

More than 3 years have passed since last update.

Minecraft Skript 基礎編 Part.3

Last updated at Posted at 2019-05-06

on damageについて・・・

on damageというイベントではこれまで紹介してきたplayerが使えなくなる。

と、いうのもon damageというのは殴った側、殴られた側という関係がある。

この時にplayerを違うと判定できないため、ここで使うのは殴った側がattackerで殴られた側がvictimという関係になる。

では簡単にコードを書いてみましょう。

コードを書いてみる・・・

test.sk
on damage:
    broadcast "殴った人:%attacker%  殴られた人:%victim%"

これでイベントが実行されたら殴った人の名前と殴られた人の名前が表示されることになる。

次はコチラ

前はコチラ

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0