#How do I make the script updated at a certain time?

1 messages · Page 1 of 1 (latest)

sharp prism
#

how to detect, for example, damage and reduced durability, the script will be updated?

loud field
#

for damage you can use the entity hurt event

#
world.afterEvents.entityHurt.subscribe(function (event) {
    world.sendMessage(`${event.hurtEntity.typeId} was damaged.`);
});
#

durability would be a little more complex and need you to track the items durability every tick or every use and determine if it changed