Artık düzgün çalışıyor. Sayende yeni bir şey öğrendim
Kod:
on rightclick:
player's tool is paper named "&c&lBandaj"
health of player < 9:
remove 1 paper named "&c&lBandaj" from player
send player title "" with subtitle "&c&lSakın kımıldama!" for 2 seconds
set {playerloc.%player's location%} to true
wait 1 seconds
if {playerloc.%player's location%} is true:
send player title "&4*" with subtitle "&c&lSakın kımıldama!" for 2 seconds
add 1 to health of player
wait 1 seconds
health of player < 9:
wait 1 seconds
if {playerloc.%player's location%} is true:
send player title "&4**" with subtitle "&c&lSakın kımıldama!" for 2 seconds
add 1 to health of player
wait 1 seconds
health of player < 9:
wait 1 seconds
if {playerloc.%player's location%} is true:
send player title "&4***" with subtitle "&c&lSakın kımıldama!" for 1 seconds
add 1 to health of player
delete {playerloc.%player's location%}
stop
else:
send player title "" with subtitle "&cOlduğun yerde durmadın!" for 2 seconds
delete {playerloc.%player's location%}
else:
send "&cYeterli bir şekilde can verildi."
delete {playerloc.%player's location%}
else:
send player title "" with subtitle "&cOlduğun yerde durmadın!" for 2 seconds
delete {playerloc.%player's location%}
else:
send player title "" with subtitle "&cYeterli bir şekilde can verildi!" for 2 seconds
delete {playerloc.%player's location%}
else:
send player title "" with subtitle "&cOlduğun yerde durmadın!" for 2 seconds
delete {playerloc.%player's location%}
else:
send player title "" with subtitle "&cZaten canın dolu." for 2 seconds
[automerge]1527247784[/automerge]
Çünkü hareket etmesen bile fareni döndürdüğünde yaw pitch bakış açıları değişir.
Bunun için konumların sadece x, y ve z koordinatlarını kontrol etmeniz gerekiyor.
Evet skriptte biraz sıkıntı var
location of player event kullanmama rağmen pitchi de algılıyor fakat veride algılamıyor mesela
{_loc.%player's location%} is true
[automerge]1527247956[/automerge]
eski locationla yeni location arasındaki mesafeden hesaplattır. yani yarım blok uzaklıktan fazla olrsa kessin can basmayı
distance between player and {location.%player%} < 0.5
Yarım bloktan bile hareket etmiyoruz. Pitch ve yaw ile alakalı bir sorun vardır ama hallettim. Güncel skript yukarda.