[istek] Yürütme

GolcuOsman

Kızıltaş Madencisi
En iyi cevaplar
0
PHP:
command /spawnla:
    permission: admin.server
    trigger:
        spawn a baby zombie 1 meter above {alan1.location}
        while last spawned entity exists:
            make last spawned entity pathfind to {alan2.location} with speed 1
            wait 1 seconds
Bu zombi alan2 ye vardıktan sonra alan3 e yürüyecek bunu yapabilirmiyiz?

alan2ye farklı bir blok koysak o bloğa basınca alan3 e yürüse olurmu?

up
 

Axel102

Hayalet Avcısı
En iyi cevaplar
6
Kod:
spawned entity's block below block is {alan1.location}
Altındaki blok lokasyon1 ise kontrol et sonra lokasyon 2'ye yönlendir
 

GolcuOsman

Kızıltaş Madencisi
En iyi cevaplar
0
server çöktü :D
PHP:
command /spawnla:
    permission: admin.server
    trigger:
        spawn a baby zombie 1 meter above {alan1.location}
        wait a tick
        Set the last spawned entity's display name to "lwl1"
        set last spawned entity's helmet to diamond helmet
        set last spawned entity's chestplate to diamond helmet
        set last spawned entity's leggings to diamond leggings
        set last spawned entity's boots to diamond boots
        while last spawned entity exists:
            if last spawned entity is above {alan1.location}:
                make last spawned entity pathfind to {alan2.location} with speed 1
            if last spawned entity is above {alan2.location}:
                make last spawned entity pathfind to {alan3.location} with speed 1
 

GolcuOsman

Kızıltaş Madencisi
En iyi cevaplar
0
While döngüsüne zamanlama eklememişsin tick'den bile kısa sürede yenilendiği için çökertmiş örnek
Kod:
while blablaba..:
wait 1 second
blalbalb
PHP:
command /spawnla:
    permission: admin.server
    trigger:
        spawn a baby zombie 1 meter above {alan1.location}
        wait a tick
        Set the last spawned entity's display name to "lwl1"
        set last spawned entity's helmet to diamond helmet
        set last spawned entity's chestplate to diamond helmet
        set last spawned entity's leggings to diamond leggings
        set last spawned entity's boots to diamond boots
        wait a tick
        while last spawned entity exists:
            wait 1 second
            if last spawned entity is above {alan1.location}:
                make last spawned entity pathfind to {alan2.location} with speed 1
                wait 1 second
            if last spawned entity is above {alan2.location}:
                make last spawned entity pathfind to {alan3.location} with speed 1
                wait 1 second
server çökmüyor fakat alan2 yede alan3e de yürümüyor olduğu yerde duruyor

PHP:
command /spawnla:
    permission: admin.server
    trigger:
        spawn a baby zombie 1 meter above {alan1.location}
        wait a tick
        Set the last spawned entity's display name to "lwl1"
        set last spawned entity's helmet to diamond helmet
        set last spawned entity's chestplate to diamond helmet
        set last spawned entity's leggings to diamond leggings
        set last spawned entity's boots to diamond boots
        wait a tick
        while last spawned entity exists:
            wait 1 second       
            make last spawned entity pathfind to {alan2.location} with speed 1
            if last spawned entity is above {alan2.location}:
                stop
                make last spawned entity pathfind to {alan3.location} with speed 1
                wait 1 second
Böyle yapıncada alan2ye yürüyor alan3e yürümüyor
 
Üst