Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
273
Creature Distance from Player #104
Shows text on a creature with distance from player.
222b | 5 lines.
onCreaturePositionChange(function(creature, oldPos, newPos)
  if newPos == nil then return end
  if not creature:isCreature() then return end
  creature:setText(getDistanceBetween(pos(), creature:getPosition()))
end)

24 Aug 2022
Ads