Solved Loop blocks and players not working as expected

  • 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.

ctf2486

Member
Apr 16, 2022
4
0
1
54
I have this script set up to act as temperature using Skript, but there's an issue. If two players stand very close together next to the campfire, one of them doesn't get the variable increase. Is there anything I can do about this?

Code:
every 2 ticks:
    loop all players:
        loop all blocks in radius 5 of loop-player:
            if loop-block is campfire[lit=true] or soul campfire[lit=true] or fire or soul fire or lava or flowing lava:
                if {temp::%loop-player's uuid%} >= 100:
                    stop
                else:
                    add 1.5 to {temp::%loop-player's uuid%}
 
Code:
                if {temp::%loop-player's uuid%} >= 100:
                    stop
                else:
                    add 1.5 to {temp::%loop-player's uuid%}

->

Code:
                if {temp::%loop-player's uuid%} <= 100:
                    add 1.5 to {temp::%loop-player's uuid%}
 
I have this script set up to act as temperature using Skript, but there's an issue. If two players stand very close together next to the campfire, one of them doesn't get the variable increase. Is there anything I can do about this?

Code:
every 2 ticks:
    loop all players:
        loop all blocks in radius 5 of loop-player:
            if loop-block is campfire[lit=true] or soul campfire[lit=true] or fire or soul fire or lava or flowing lava:
                if {temp::%loop-player's uuid%} >= 100:
                    stop
                else:
                    add 1.5 to {temp::%loop-player's uuid%}
how has your server not crashed
 
Status
Not open for further replies.