#Without killing the entities sometimes they die and my death event does not trigger

1 messages · Page 1 of 1 (latest)

shut magnet
#

here is the code I want to run every time a non player entity dies

But for some reason not every time does it run and it offsets my variable

on death:
    type of victim is not player:
        {dfdspawned::%world of victim%} > 0:
            remove 1 from {dfdspawned::%world of victim%}
            if {dfdspawned::%world of victim%} = 0:
                send "&8[&6Dungeon&8] &7You have found a key... Where does it lead?" to all players in world of victim
        if metadata value "melee" of victim is true:
            drop 20 exp at location of victim
        if metadata value "rusty" of victim is true:
            drop 15 exp at location of victim
shut magnet
#

bump bc i reallly dont know whats going on

simple plover
#

idk why you'd bump if its at the top

shut magnet
#

Really helpful

blazing relic
#
    if victim is not player:
        {dfdspawned::%world of victim%} > 0:
            remove 1 from {dfdspawned::%world of victim%}
            if {dfdspawned::%world of victim%} = 0:
                send "&8[&6Dungeon&8] &7You have found a key... Where does it lead?" to all players in world of victim
        if metadata value "melee" of victim is true:
            drop 20 exp at location of victim
        if metadata value "rusty" of victim is true:
            drop 15 exp at location of victim```
#

where are u setting the variable

#

and debug

#

add broadcasts

shut magnet
#

When they’re spawned it’s a separate skript

shut magnet
#

The death skript

#

Which is odd because it’s literally an on death like

blazing relic
#

ok check when the looped entities are below 0 health... and then remove them from a list of the spawned ones

#

try that

#

loop list:

#

and if the health is below 0

shut magnet
#

yk im so stupid