D
Deleted member 21021
Skript Version (do not put latest): Skript 2.6
Skript Author: Bensku
Minecraft Version: 1.17.1
---
I apologize for the weird lay-out, this is my very first post.
Description:
When a player places TNT, my skript proceeds to store whoever placed the TNT's name. If a player dies to this specific TNT, a death message appears in chat with the victim's name, the name of whoever placed the TNT and the victim's cause of death; in this case, TNT.
I'm doing this to give credit to whoever managed to kill someone with TNT. I want to do the same thing with all the common items you can kill someone with (e.g. lava, gravel, anvil) later on. I need this 'kill register' for future reference.
The death message should be the following:
Instead, I'm getting this:
I'm thinking something is going wrong when storing the metadata value into a variable in the on death of player, but I can't seem to fix this:
The full code has been included below. Is there anything who knows what the problem is? Thanks in advance.
Full Code:
Errors on Reload/Console Errors:
There are no errors on Reload or in Console.
Addons using (including versions):
Skript v2.6, SkQuery v4.1.4, Skellet v1.9.1.1
Troubleshooting:
Have you tried searching the docs? Yes. I took a look at on death:, death messages and metadata.
Have you tried searching the forums? Yes. This is the closest I've gotten: https://forums.skunity.com/threads/get-the-attacker-of-a-tnt.6812/
What other methods have you tried to fix it? I tried several ways of storing the metadata and using the metadata in the on death: event. Nothing has worked so far.
[doublepost=1642617176,1642434397][/doublepost]I still haven't been able to fix this issue I'm currently having. Has anyone found a solution?
[doublepost=1643207236][/doublepost]Still nothing..
Skript Author: Bensku
Minecraft Version: 1.17.1
---
I apologize for the weird lay-out, this is my very first post.
Description:
When a player places TNT, my skript proceeds to store whoever placed the TNT's name. If a player dies to this specific TNT, a death message appears in chat with the victim's name, the name of whoever placed the TNT and the victim's cause of death; in this case, TNT.
I'm doing this to give credit to whoever managed to kill someone with TNT. I want to do the same thing with all the common items you can kill someone with (e.g. lava, gravel, anvil) later on. I need this 'kill register' for future reference.
The death message should be the following:
Code:
TimmieTRM was exploded by *TimmieTRM1426's TNT.
Instead, I'm getting this:
Code:
TimmieTRM was exploded by <none>'s TNT.
I'm thinking something is going wrong when storing the metadata value into a variable in the on death of player, but I can't seem to fix this:
Code:
set {_attacker} to metadata value "attacker" of attacker
The full code has been included below. Is there anything who knows what the problem is? Thanks in advance.
Full Code:
Code:
on place:
set metadata value "attacker" of event-block to "%player%"
message "%metadata value "attacker" of event-block% placed %event-block%"
on death of player:
if attacker is set:
if attacker is TNT:
set {_attacker} to metadata value "attacker" of attacker
set {_attacker} to {_attacker} parsed as player
set death message to "%victim% was exploded by %{_attacker}%'s %attacker%"
Errors on Reload/Console Errors:
There are no errors on Reload or in Console.
Addons using (including versions):
Skript v2.6, SkQuery v4.1.4, Skellet v1.9.1.1
Troubleshooting:
Have you tried searching the docs? Yes. I took a look at on death:, death messages and metadata.
Have you tried searching the forums? Yes. This is the closest I've gotten: https://forums.skunity.com/threads/get-the-attacker-of-a-tnt.6812/
What other methods have you tried to fix it? I tried several ways of storing the metadata and using the metadata in the on death: event. Nothing has worked so far.
[doublepost=1642617176,1642434397][/doublepost]I still haven't been able to fix this issue I'm currently having. Has anyone found a solution?
[doublepost=1643207236][/doublepost]Still nothing..