please help me, i don't know how to do this with script

  • 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 community!

    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.

izNony

Member
Nov 5, 2022
1
0
1
I would like to start a server and have started with scripting. I want to give the barrier block a radius of 20. if a player is in the radius he should get instant damage, how do I do that? I've been looking for tutorials all the time but I can't find anything... Would be nice if someone could help me
 
Code:
options:
    damageAmount: 5 #In full hearts
    radius: 20

every 5 ticks:
    loop all players:
        loop all blocks in radius {@radius} of loop-value:
            if loop-value-2 = barrier:
                damage loop-value-1 by {@damageAmount} hearts

In testing, I found that 20 blocks is quite a bit, but then again, I don't know what you need this for. Customize the options to your likings, and reply if you had any problems (you shouldn't since it worked for me without any addons). Have a good day!
 
Status
Not open for further replies.