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!

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

Other Block Effects

Discussion in 'Tutorials' started by winterwolf007, Feb 26, 2017.

  1. winterwolf007

    winterwolf007 Member

    Joined:
    Feb 24, 2017
    Messages:
    8
    Likes Received:
    4
    This is a tutorial for effects with blocks.

    We will now start with a radius from the location of a block. This code loops entities in a radius of 5 around the block's position.

    Code (Skript):
    1. loop all entities in radius 5 around blocks's location:
    Now we will add an event for in which this loop will occur. For example, I will be using On Place as the event

    Code (Skript):
    1. on place:
    2.     loop all entities in radius 5 around block's location:
    Now, we will add an effect to the loop. Some effects can only be used for some things like blocks or entities.

    Code (Skript):
    1. on place:
    2.     loop all entities in radius 5 around block's location:
    3.         teleport loop-entity to block
    4.  
    Now, when we place a block, it will loop all entities in a radius of 5, and teleport them to the block. But we want only dropped items, not animals or monsters. We can define 'loop-entity' by adding a condition.

    Code (Skript):
    1. on place:
    2.    loop all entities in radius 5 around block's location
    3.         if loop-entity is a dropped item:
    4.              teleport loop-entity to block
    This makes it so when you place some block like sandstone, it teleports all dropped items in a radius of 5 blocks to the location of the block you placed

    You can also change the event to be more specific, like instead of on place (of any block), we can change it to on place of sandstone.

    Code (Skript):
    1. on place of sandstone:
    2.     loop all entities in radius 5 around block's location:
    3.         if loop-entity is a dropped item:
    4.              teleport loop-entity to block
    This makes it so when you place a sandstone block, it loops all dropped items around it (radius of 5 blocks) and teleports it to the sandstone block.

    Now, we want it to keep on doing this process over and over again. We can add loops and a wait time to make this process repeat.

    Code (Skript):
    1. on place of sandstone:
    2.   loop all entities in radius 5 around block's location:
    3.        loop 10 times:
    4.            wait 1 second
    5.            if loop-entity is a dropped item:
    6.                 teleport loop-entity to block
    This makes it so when you place a sandstone block, it loops all dropped items in a radius of 5 blocks, then it waits one second and teleports the dropped item to the block. This process repeats 10 times, caused by the
    'loop 10 times'



    That's it for the tutorial, if you have any questions, please feel free to message me.
     
    #1 winterwolf007, Feb 26, 2017
    Last edited: Mar 4, 2017
    • Useful Useful x 1
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Just wanted to point that there is only Skript syntax there, no addon needed.
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Am i only one who doesn't see point of this tutorial?

    And yeah, it does nothing Skellett does.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    what even are you trying to give us a tutorial on???
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    The tutorial I am giving you guys on is in the title. . This is just an example of what it can do. And this tutorial can be used for beginners and intermediate skripters. 'Another man's trash is another man's treasure'
    This skript's usefulness can be viewed in different ways. If you make a ton of advanced tutorials, then the beginner skripters don't know how to use the tutorial because it is too advanced for them. There has to be some tutorials for newer skripters. And parts of the tutorial can be used, looping in radius of a block can be changed into player or whatever. The teleportation of entities can be used for magnet skripts or anything else like a clear lag skript.
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Another's man trash is another man's treasure doesn't apply here since we aren't talking material; this is completely 100% useless as all of this can be found on the docs in less than 10 seconds, and it's self explaining code, honestly the tutorial stuff is meant to give people tutorials on certain objects, if you want to do a tutorial on loops, make sure to go from basic basic to very advanced, or it's useless.
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    It can apply if it is in the 3rd person. Anyways, I made this tutorial for newer skripters, It can be used for different things, as told above.
     
    • Agree Agree x 1
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    It is a useful tutorial, I mean I don't see the point on belittling the guy for a half decent tutorial on using the "On Place" event, this is great for people who are just getting started.

    Great tutorial @winterwolf007 :emoji_slight_smile:
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    no, just no.
     
Loading...