#(whospostal) Combatlog

21 messages · Page 1 of 1 (latest)

weak osprey
#

Having an issue with a combat if statement dont quite see what im doing wrong looking for alittle help. this if statement doesnt seem to be working im getting an issue with the <context.victim.has_flag[is_in_combat]>

thin sealBOT
#

(whospostal) Combatlog

thin sealBOT
#

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.

tepid depot
#

!debug

sonic badgerBOT
# tepid depot !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

weak osprey
#
  • if <context.damager.has_flag[is_in_combat]> || <context.victim.has_flag[is_in_combat]>:
upper pawn
#

!E entity damaged

sonic badgerBOT
# upper pawn !E entity damaged
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

tepid depot
#

Check the lists of context there ^

#

victim isn't one of them

weak osprey
#

at the bottom in the examples so i figured it was one would i just use entity isntead?

tepid depot
#

entity is the correct context, yes

#

not sure what you mean about the search?

weak osprey
#

thank you i was just confused because of the example on that page

lime pike
#

Every event has its own context tags

weak osprey
#

after attack:
- narrate "You attacked <context.victim.name> with a <context.level> enchantment!"

#

oh okay my fault i miss understood

#

thank yall for clearing that up