Solved Help with on damage of entity regarding level of player

  • Welcome to skUnity!

    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 comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Tanner

New Member
Mar 30, 2020
5
0
0
25
Skript Version (do not put latest): Skript 2.4 (maybe, don't know how to tell)
Skript Author: Tanner
Minecraft Version: 1.15
---
Full Code:
on damage of pig:
if {levels::%attacker%} is more than 1: #This is set to more than 1 for test purposes
broadcast "test" #broadcast is set for test purposes

Ok so I am brand new to skripting! I am just days in and I have run into a small issue. I am trying to get my skript to send out a broadcast for test purposes on attack of entity. I want it to be based of player level. The game is giving no errors when reloading the skript, I searched all last night to try to figure out why this isn't sending me a broadcast on damage of pig.
 
Last edited:
Skript Version (do not put latest): Skript 2.4 (maybe, don't know how to tell)
Skript Author: Tanner
Minecraft Version: 1.15
---
Full Code:
on damage of pig:
if {levels::%attacker%} is more than 1: #This is set to more than 1 for test purposes
broadcast "test" #broadcast is set for test purposes

Ok so I am brand new to skripting! I am just days in and I have run into a small issue. I am trying to get my skript to send out a broadcast for test purposes on attack of entity. I want it to be based of player level. The game is giving no errors when reloading the skript, I searched all last night to try to figure out why this isn't sending me a broadcast on damage of pig.

Code:
on damage of pig:
    if attacker's level is greater than 1:
        broadcast "Test"

Here it is. I hope it can help you. Please note that 1 equals that is has to be 2. So if you want it to be if you have 1 level then you need to write 0.
 
Code:
on damage of pig:
    if attacker's level is greater than 1:
        broadcast "Test"

Here it is. I hope it can help you. Please note that 1 equals that is has to be 2. So if you want it to be if you have 1 level then you need to write 0.
Thank you very much!
 
Status
Not open for further replies.