#(mrcrash) on entity damages entity + <context.entity> = error

14 messages · Page 1 of 1 (latest)

prisma marten
#

Hi,

Using <context.entity> inside on entity damages entity say Error Message: Tag-base 'context' returned null.

script:
https://paste.denizenscript.com/View/131261
debug:
https://paste.denizenscript.com/View/131260

hushed cedarBOT
#

(mrcrash) on entity damages entity + <context.entity> = error

hushed cedarBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

prisma marten
#

It is a bug? mrblobeko

terse ivy
#

!e entity damages entity

ivory parcelBOT
# terse ivy !e entity damages entity
Group

Entity

Event Lines

<entity> damaged by <entity> <entity> damaged (by <cause>) <entity> damages <entity>

Switches

with:<item> to only process the event when the item used to cause damage (in the damager's hand) is a specified item.
type:<entity> to only run if the entity damaged matches the entity input.
block:<block-matcher> to only run if the damage came from a block that matches the given material or location matcher.

Triggers

when an entity is damaged.

Has Player

when the damager or damaged entity is a player. Cannot be both. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Has NPC

when the damager or damaged entity is an NPC. Cannot be both.

Context

<context.entity> returns the EntityTag that was damaged.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.damager_block> returns the LocationTag of a block that damaged the entity, if any.
<context.cause> returns an ElementTag of reason the entity was damaged - see !language damage cause for causes.
<context.damage> returns an ElementTag(Decimal) of the amount of damage dealt.
<context.final_damage> returns an ElementTag(Decimal) of the amount of damage dealt, after armor is calculated.
<context.projectile> returns a EntityTag of the projectile, if one caused the event.
<context.damage_type_map> returns a MapTag the damage dealt by a specific damage type with keys: B...
<context.was_critical> returns 'true' if the damage was a critical hit. (Warning: this value is ca...

Determine

ElementTag(Decimal) to set the amount of damage the entity receives.
"CLEAR_MODIFIERS" to zero out all damage modifiers other than "BASE", effectively making damage == final_damage.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Examples

Examples too long to display... Check the website for more examples

terse ivy
#

you didn't convert it into a locationtag before doing find_spawnable_blocks_within

prisma marten
#

true

#

but what's about - teleport <context.entity> <[tp].above[2]>

#

don't need a locationTag ?

terse ivy
#

no, but the tp definition doesn't mean anything because it's tied to that previous error

prisma marten
#

oh okay

#

yeah that work, thank's !