#Detect specific entity has died?

1 messages · Page 1 of 1 (latest)

analog girder
#

because you are using a local variable outside of the section you created it in.

azure compass
#

remove the _ to the variable

lofty plinth
#
    spawn a zombie at player's location
    set {_ent} to last spawned entity
    set {alive.%entity%} to {_ent}
    set the name of {_ent} to the player's name

on death:
    if victim is {alive.%victim%}:
        #set {alive.%ent%} to false
        broadcast "Died"```
#

thats what i got right now

proud jasper
#

Local vars only work in the same event

lofty plinth
#

It still wont broadcast

proud jasper
#

Not in 2 different vars

lofty plinth
#

is {alive.%victim%} a local variable?

proud jasper
#

No

lofty plinth
#

well that wont work either

proud jasper
#

I spoonfed

#

Your issue

lofty plinth
#

damn

proud jasper
#

{alive.%entity%}

#

There is no entity in an on quit

#

An entity cant quit

lofty plinth
#

kk

proud jasper
#

And on death.. you did {alive.%ent%}
%ent% is not a thing

#

%entity%

lofty plinth
#

kk

#

so {word.%specifcthing%} has to be related to the actual event

proud jasper
#

On quit: you cant use attacker victim entity

#

Shooter

#

Etc

lofty plinth
#

kk