Files

45 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# pirt3.js — runProjectile() (satır 166)
[← pirt3.js](index.md) · [← Master](../../wiki.md)
Parça 5/6 · [önceki](runProjectile-4.md) · [sonraki](runProjectile-6.md)
```javascript
// Mob veya morph uygulanamayan bir varlıksa hata fırlatıp skripti çökertmesin
}
ent.damage(SPELL_CONFIG.DAMAGE_AMOUNT);
}
}
}
// Siyah duman patlama partikülleri
var spread = SPELL_CONFIG.CRATER_RADIUS * 0.4;
spawnSpellParticle(world, SPELL_CONFIG.PARTICLE_EXPLODE_1, hitPos.x, hitPos.y, hitPos.z, 500, spread, spread * 0.7, spread, 0.1);
spawnSpellParticle(world, SPELL_CONFIG.PARTICLE_EXPLODE_2, hitPos.x, hitPos.y, hitPos.z, 300, spread * 1.1, spread * 0.8, spread * 1.1, 0.05);
spawnSpellParticle(world, SPELL_CONFIG.PARTICLE_EXPLODE_3, hitPos.x, hitPos.y, hitPos.z, 200, spread * 1.25, spread * 0.9, spread * 1.25, 0.02);
// Devasa patlama sesleri
world.playSound("minecraft:entity.generic.explode", hitPos.x, hitPos.y, hitPos.z, 7.0, 0.6);
world.playSound("minecraft:entity.firework.large_blast", hitPos.x, hitPos.y, hitPos.z, 7.0, 0.7);
// Şok Dalgası Tetikle
c.setValue("shockwaveRadius", 2.0);
c.scheduleScript("runShockwave", 1);
// Çemberden Küreye Morflanan partikül animasyonunu başlat
c.setValue("explosionAnimTick", 0);
c.scheduleScript("runExplosionParticles", 1);
// 5 saniye sonra otomatik krater onarımını başlat!
c.scheduleScript("restoreLayerStep", SPELL_CONFIG.RESTORE_START_TICK);
return;
}
projTick++;
c.setValue("projTick", projTick);
c.setValue("projPos", nextPos);
if (projTick < SPELL_CONFIG.PROJECTILE_MAX_TICKS) {
c.scheduleScript("runProjectile", 1);
```