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.

Solved How to get the direction of a loop-block

Discussion in 'Skript' started by Jack57320, Jun 23, 2018.

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

    Jack57320 Member

    Joined:
    Jun 19, 2018
    Messages:
    13
    Likes Received:
    0
    Hello
    I've problem, I'm trying to get the direction of a loop-block (like north or the others)
    I've tried this code :

    Code (Skript):
    1. every 3 second in "world":
    2.     loop all players:
    3.         if loop-player exists:
    4.             loop all blocks in radius 5 around the loop-player:
    5.                 if loop-block is a pumpkin:
    6.                     set {citrouille} to random integer between 1 and 10
    7.                     set {citrouille_direction} to direction of loop-block
    8.                     if {citrouille} == 5:
    9.                         message "changement" to loop-player
    10.                         set loop-block to glowing pumpkin
    Coul'd you please help me ;D

     
    • Creative Creative x 1
  2. Best Answer:
    Post #4 by MusicManSK, Jun 24, 2018
  3. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    try
    Code (Skript):
    1. set {citrouille_direction} to direction of location of loop-block
     
    • Agree Agree x 1
  4. Jack57320

    Jack57320 Member

    Joined:
    Jun 19, 2018
    Messages:
    13
    Likes Received:
    0
    okay please how can i set the direction when i do "set loop-block to glowing pumpkin"
     
  5. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Hmm.. Every pumpkin with certain direction has custom ID.. So you have to find or try which ID is for which direction.. And then
    Code (Skript):
    1. set loop-block to "<id>" parsed as block
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...