#How to fix name for items

1 messages · Page 1 of 1 (latest)

rain coral
#

currently I have a skript for showing the health of an entity in it's name but it shows for items and I don't know how to fix it

  loop all entities:
    if loop-entity is not an item:
      set name of loop-entity to "&7Test &4%health of loop-entity%&7/&4%max health of loop-entity%❤"
      show the custom name of loop-entity
    else:
      hide the custom name of loop-entity```
drifting hinge
#

oh my god

prisma hedge
#

sob

rain coral
#

can i get help?

#

or no

#

i swear skript help is just for making fun of people instead of helping

prisma hedge
rain coral
rain coral
#

absolutely 0 help

prisma hedge
#

but that isn't making fun of you

rain coral
#

wtv

#

i still would like help

prisma hedge
#

thats just being shocked because your code is so bad but we are keeping it to ourselves

rain coral
#

not everyone knows how to skript

#

and im trying to learn

prisma hedge
rain coral
#

because im not detecting for players

#

its not for pvp

prisma hedge
#

then on damage:

#

that way it won't show for dropped items and won't be crazy unoptimised

rain coral
#

and still

#

i would like the health of an entity to show before you attack it

prisma hedge
rain coral
#

okay

#

and on damage?

#

so both

#

okay

prisma hedge
#

on entity added to world wait 1 tick set name of event-entity to "" same thing for on damage

#

only like 5 lines code

rain coral
#

yea

#

and i still do on damage too right?

prisma hedge
#

yeah if u want it to update when a mob is damaged

rain coral
prisma hedge
#

do u got skbee

#

u need skbee for on entity added to world iirc

rain coral
#

ill add it

#

does it work for 1.21.4

prisma hedge
#

ofc

rain coral
#

okay

#

1 second

#

i have this

#
  wait 1 tick
  if entity is not an item:
    set {_ogname} to name of entity
    set name of entity to "&7%{_ogname}% &4%health of entity%&7/&4%max health of entity%❤"
    show the custom name of entity

on damage:
  wait 1 tick
  if victim is not an item:
    set name of victim to "&7%{_ogname}% &4%health of victim%&7/&4%max health of victim%❤"
    show the custom name of victim```
#

it still shows for items

#

also dont talk about the variable i just fixed that

rain coral
prisma hedge
rain coral
#
  wait 1 tick
  event-entity is not dropped item
  set {ogname%entity's uuid%} to name of entity
  set name of entity to "&7%{ogname%entity's uuid%}% &4%health of entity%&7/&4%max health of entity%❤"
  show the custom name of entity

on damage:
  wait 1 tick
  set name of victim to "&7%{ogname%victim's uuid%}% &4%health of victim%&7/&4%max health of victim%❤"
  show the custom name of victim```
rain coral
prisma hedge
#

no need

#

but if u want

rain coral
#

yea

#

it still dont work

rain coral
prisma hedge
#

for dropped items?

rain coral
#

yea

rain coral
prisma hedge
#

hm try broadcasting the type of the entity and seeing what it is

rain coral
#

oof

prisma hedge
#

hm idk I tested its a 'dropped spruce door' if I drop a spruce door

rain coral
#

ye

#

it shows that

#

also do i have to change it all to event-entity

#

or is entity fine

prisma hedge
#

entity should be fine

#
  wait 1 tick
  broadcast event-entity
  broadcast type of event-entity
  if event-entity is a dropped entity:
    broadcast "ye its a dropped"``` it isn't broadcasting ye its a dropped so idk
rain coral
#

i could do smth like

#

event-entity's name does not include "dropped" or "xp"

prisma hedge
#

shrug

rain coral
#

yea doesnt work

rain coral
#

event-entity does not contain "dropped" or "xp" this doesnt get any errors but doesnt work

#

okay

#

thank you

rain coral