Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
You chan check on death of entity insteadHi guys, i really need help. I want to make that when an npc is killed, it does something, like this:
but it won't work. Please help!Code:on npc death: if victim's name is "test": #do something
nothing happens.. It's like skript won't read it, when i load the skript it says no errors.
Yes, my npc's name is "&dPiggy" and i correctly wrote it in the skriptAre you completely sure the correct npc name is used?
on death:
if victim is a entity:
if name of victim is "name":
send "it works" to attacker
mh no, doesn't works xd, it's maybe something else that corrupts the skript? maybe some plugin?ohh im stupid, it's because I set it to check for "if name of entity is "name", when it should be "if name of victim is "name".
[doublepost=1589564735,1589564704][/doublepost]Code:on death: if victim is a entity: if name of victim is "name": send "it works" to attacker
It worked just fine for memh no, doesn't works xd, it's maybe something else that corrupts the skript? maybe some plugin?
i just saw the console and there's a HUGE error, i can't even copy it allIt worked just fine for me
just copy it from /logs/latest.logi just saw the console and there's a HUGE error, i can't even copy it all
I mean, for the sake of people viewing this, please edit the message and post it in a pastebin link insteadi never used it xD
I meant, edit the other message and replace aaallll the text with the linkhere it is: https://pastebin.com/sLmEi8i6
ah oof, ok xDI meant, edit the other message and replace aaallll the text with the link
on damage:
if victim is npc:
if attacker's held item's name is "&b&lStarter Sword":
cancel event
damage victim by 1 heart
ah oof, ok xD
[doublepost=1589568874,1589566322][/doublepost]i tried in all ways, but did nothing, idk why
[doublepost=1589579822][/doublepost]if you want details: The NPC is done by Citizens and Sentinel, with sentinel i change it's health and respawntime, at this point im thinking that there's a plugin conflicting with the skript, or maybe, other skripts that do the same (i have 7 skript in the folder).
[doublepost=1589581482][/doublepost]Ooooh im literally soo stupid!! There was a skript changing the attack damage of swords. Here is the skript:
Code:on damage: if victim is npc: if attacker's held item's name is "&b&lStarter Sword": cancel event damage victim by 1 heart
this was the problem, because the attacker doesn't really deal damage to the victim, so it doesn't count as a kill. Im sorry im literally so stupid!