loops

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

  1. C

    Solved How can I prevent a loop from doing damage to the player with Skript

    I am programming a plugin in Skript using SkRayFall (though I'm unsure that that's useful for this scenario, I should put it there anyway) and I have a program that's supposed to damage all entities in a 1 block radius while pushing the play forward. This works fine, although it damages the...
  2. A

    Looping too many blocks crashes server

    I am creating a mini-game using skript. Bad news, I am trying to loop blocks in radius 180+ around a block and my server crashes because of the skript checking for many blocks on command /test: permission:op trigger: set {test} to 184 set {test2} to {test} -2 loop...
  3. S

    Many different errors involving loop-player

    Im trying to make a side bar to show the players money, and i made this test sidebar but it gives 3 errors. every 1 seconds: loop all players: #Cant understand condition/effect wipe loop-player sidebar wipe loop-player sidebar #loop-player is neither an item stack...
  4. Jimsk

    see amount of loop-item

    on right click with paper: loop all items of player's inventory: if name of loop-item is "&6$0.50": remove loop-item from player add 0.50 to player's balance This code works but only gives 0.50 when it takes all the items. I have tried using "set {_amount::*}...
  5. T

    Solved Amount of blocks within 2 locations without loops?

    Hello! So I was wondering if there was a way to check the amount of blocks within 2 locations without using loops? What I mean is something like this:set {_count} to amount of {_block} within {loc1} and {loc2} That would obviously not work but is there something that could do it?
  6. Haloxx

    How can i make my code look cleaner?

    i have this long annoying code and it works but it looks like a 5 year old made it on mine of any ore: player is sneaking: if event-block is iron ore: cancel event loop blocks in radius 2 around event-block: if loop-blocks is iron ore: loop blocks in radius 2...
  7. VerySmashing

    Send Action Bar "" to Loop-Player not working.

    Hello, I looked around in the forums to see if others were having the same problem as me, but theirs were fixed by my problem. :( I am working on a minecraft rpg server, which is for a specific fandom I like. I'm trying to create a battle skript, but this specific part that I'm having issues...
  8. acai

    Skript Using "Loops"

    Hello! Welcome to my second tutorial. This is a very simple lesson, but I am using it in a way some people would not. We will be using loops to count players, entities, and blocks today! How do I use loops, you may ask? After an event and the correct syntax, you can use a loop. Let's start with...
  9. CUrrUpt Enxo

    Variable help

    hmm yes variables {playersgens::%player's uuid%::%{_tag}%::%location%} You see that variable right ima explain what I need help with. I want to find the {_tag} value according to a location but I want to do this without looping the index. I don't even know if this is possible but if its not I...
  10. J

    Capture Point Capping

    Im having trouble with a KOTH, so as long as a player is in the control point, it will keep adding points until it reaches 500, I have no trouble when players are no longer capping the point, but when they go back into the point it adds all the points that the player would have gained if he was...
  11. O

    TuSKe Gui being overwritten.

    command /shop: trigger: open virtual chest with size 3 named "&9Shop" to player wait 1 tick set {_slot} to 0 loop 27 times: format gui slot {_slot} of player with random element out of {backgrounds::*} named " " add 1 to {_slot}...
  12. N

    Solved Time difference for voting

    I wonder how to do this, if someone can fix this skript for me, I would really appreciate it. I found some stuff on the internet, but I didn't quite understand it, so this is why I am asking for this. every 5 minutes: loop all players: if {vote::cooldown::%loop-player's uuid%} is not set...
  13. Vane2k16

    If one variable is set to "ingame" how can i use the other?

    Hello, and thanks for reading what I'm writing :emoji_slight_smile:. I have 2 maps (both in one world) and everything works but if one map is set to ingame you can only get back into the other one if the timer sets it to "ready" again. I want if {oneline.arena::%loop-index%} is "ingame" that...
  14. F

    Solved Running multiple loops at the same time

    I'm making a skript that creates a gui-based slots machine. I want to be able to run the spinning animation of the 3 "reels" I have at the same time, how can I do this? Here's my code so far: (Code for win conditions and stuff not implemented yet) command /playslots: permission: slots.play...