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

On break

Discussion in 'Skript' started by Gavin Hill, Feb 25, 2019.

Thread Status:
Not open for further replies.
  1. Gavin Hill

    Gavin Hill Member

    Joined:
    Jan 27, 2019
    Messages:
    6
    Likes Received:
    0
    how would I do it when I break the sea lantern the apples stop spawning.


    Code (Text):
    1. on place of a sea lantern:
    2.     set {_loc} to the location 1 meter above the block
    3.     set block 1 meters above the block to glass
    4.     loop 100 times:
    5.         wait 5 seconds
    6.         drop 10 apples at the event-location
     
  2. TPGamesNL

    Supporter

    Joined:
    Jan 20, 2018
    Messages:
    1,380
    Likes Received:
    85
    Medals:
    You have to add a condition in the loop to check if the block at the location is still a sea lantern, if it's not, exit the loop
     
  3. Nutts

    Nutts Member

    Joined:
    Feb 9, 2019
    Messages:
    10
    Likes Received:
    0
    I'll code what TPGamesNL said:
    Code (Text):
    1. on place of a sea lantern:
    2.     set {_loc} to the location 1 meter above the block
    3.     set block 1 meters above the block to glass
    4.     loop 100 times:
    5.         block at event-block is not sea lantern:
    6.             exit loop
    7.         wait 5 seconds
    8.         drop 10 apples at the event-location
     
Thread Status:
Not open for further replies.
Loading...