#How to solve
1 messages · Page 1 of 1 (latest)
Try this:
import { world, Player } from "@minecraft/server";
world.afterEvents.entityHurt.subscribe((data) => {
const DamagingEntity = data.damageSource.damagingProjectile
const HitEntity = data.hurtEntity
const fireTick = data.hurtEntity.getComponent('onfire')?.onFireTicksRemaining ?? 0
if (
(data.damageSource?.damagingEntity instanceof Player) &&
data.damageSource?.damagingProjectile?.typeId == "tf2:projectile_fire" && fireTick > 0
) {
const player = data.damageSource.damagingEntity;
const target = data.hurtEntity
player.playSound("dragon.fury.bonus.damage");
target.applyDamage(56)
}
(I haven't coded for months, so I apologize for misleading typos or keyword usage in it)
sorry I'm new to scripting
thank you for this, I will check this out and lyk if it works as intended
hello! it is finally working thank you so much
this doesn’t really help them
it just allows them to get it working I doubt they even understand why it works
> Barge into the conversation
> Say it doesn't help
> Refuse to elaborate
> Leaves
I did elaborate
comes in
solves problem
doesn’t explain how they fixed it
leaves