Setting up a chain of 3 command blocks, one repeat and 2 conditional chain ones in the following format and order:
testfor @p[score_damage_min=1]
/tellraw @p ["",{"text":"Damage: "},{"score":{"name":"@p[score_damage_min=1]","objective":"damage"}}]
/scoreboard players set @p[score_damage_min=1] damage 0
should theoretically show in chat the damage dealt value before it gets reset. (note: objective 'damage' is stat.damageDealt type). Instead, the value 0 is returned from after the score is reset. For demostration purposes, I've later changed the reset value to -2 to verify that it was a timing issue rather than an arbitrary 0.
Attachments
Comments 3
Responce from a comment asking for the setup. Both are the same, except with different orientations. When I tested one I turned off the other.
Show the command block contraption too plz