1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Arena Regenerator

Discussion in 'Skript' started by Maximuse, Jan 2, 2018.

Thread Status:
Not open for further replies.
  1. Maximuse

    Maximuse New Member

    Joined:
    May 4, 2017
    Messages:
    5
    Likes Received:
    0
    Hello, what is the best (no laggy) method to restore arenas?

    I tried the following ones:
    • loop blocks from pos1 to pos2:
    • Skellett

    Please help, it is for a game I'm making!
     
  2. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    This way what you tried. Just add a wait a ticks (After settings/checking 1.000 blocks or somethings
     
  3. Maximuse

    Maximuse New Member

    Joined:
    May 4, 2017
    Messages:
    5
    Likes Received:
    0
    Meh, that works but it lags the server. Even with the waiting, the systems receives all the information of the blocks in one go when you do loop blocks from pos1 to pos2. Thats why there is no lag after it finishes looping.
     
  4. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    Then doing this:
    -If player is in a arena and break a blocks, Set the Variables like set {BlockatLoc::%location of event-block%} to event-block

    if you want reset then easy

    loop {BlockatLoc::*}
    set block at loop-index as loop-value
     
  5. Maximuse

    Maximuse New Member

    Joined:
    May 4, 2017
    Messages:
    5
    Likes Received:
    0
    Also tried that one but hey, what if a block generates somethings? For example, a block holding a sand block from falling, if you break the block the sand block is going to fall into the void. After your replace all the broken blocks the sand will not be there as the player never broke it. :emoji_slight_smile:
     
  6. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
  7. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    What about blocks forming such as cobble generating or obsidian..
     
  8. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
  9. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
  10. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    Should be fine (I used this for mine Skyblock Cobblestone generator)
     
  11. GewoonQuint

    GewoonQuint Member

    Joined:
    Oct 15, 2017
    Messages:
    15
    Likes Received:
    0
    I use multiverse to create new worlds for every match
    since I use void worlds, cloning doesn't take long and doesn't lag
    also, you can have multiple matches at the same time because you don't need to have multiple arena's
     
  12. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    On form is broken for me and many others on dev25, anyways.
     
  13. Maximuse

    Maximuse New Member

    Joined:
    May 4, 2017
    Messages:
    5
    Likes Received:
    0
    Do you guys have any code?
     
  14. martinpeeters34

    Joined:
    Jan 30, 2017
    Messages:
    30
    Likes Received:
    0
    I think all block creations are nearly impossible to detect, because there are too many ways to 'create' a block. And adding all ways of 'removing' a block to the code, would create a large mess of code (in my opinion)

    Pasting a Schematic could also be an option to solve this, but I think Skellett's regenerator is the best solution if you don't want to create lag. You could even save these per chunk if the Arena is pretty big. And FAWE is a great addition to the generator if you want to get the best performance. (I also use this a lot)

    (Sent from my Phone)
     
Thread Status:
Not open for further replies.

Share This Page

Loading...