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.

About opening a fence gate

Discussion in 'Skript' started by HKPNW-Owner, Jul 28, 2018.

Thread Status:
Not open for further replies.
  1. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    Because i'm looking it to close after it opened.
    (after i cancelled that part still not working... )
     
  2. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,124
    Likes Received:
    164
    well you have deleted the variable, so if you click the sign the variable can't be true... because you already deleted it
     
  3. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    No but i want it to enable in that 20 ticks and disable after that 20 ticks. What i'm doing are within that 20 ticks.
     
  4. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,124
    Likes Received:
    164
    that's not really a lot of time, 20 ticks is 1 second
     
  5. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    let me try 100 ticks then?..
    --
    I tried only use: (but still not working.. ?)
    It is possible that it's the problem of addon/version problem?

    Code (Skript):
    1. on right click on sign:
    2.     loop blocks in radius 5 around event-block:
    3.         if loop-block is oak fence gate:
    4.             if the data value of loop-block is 1:
    5.                 set the data value of loop-block to 5
    6.                 stop
    7.             if the data value of loop-block is 5:
    8.                 set the data value of loop-block to 1
    9.                 stop
     
  6. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,124
    Likes Received:
    164
    that might work, that would be 5 seconds, so definitely gives you some time to click the sign
     
  7. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    But it's still not working.
     
  8. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,124
    Likes Received:
    164
    try placing the gate in different positions, those data values are strictly for 1 position
    --- Double Post Merged, Jul 28, 2018, Original Post Date: Jul 28, 2018 ---
    or you could do this
    Code (Skript):
    1. on right click on sign:
    2.     send "test"
    3.     set {pay.%player's uuid%} to true
    4.     if {pay.%player's uuid%} is true:
    5.         loop blocks in radius 5 around event-block:
    6.             if loop-block is oak fence gate:
    7.                 if the data value of loop-block is 1:
    8.                     set the data value of loop-block to 5
    9.                     stop
    10.                 if the data value of loop-block is 5:
    11.                     set the data value of loop-block to 1
    12.                     stop
    13.                 if the data value of loop-block is 2:
    14.                     set the data value of loop-block to 6
    15.                     stop
    16.                 if the data value of loop-block is 6:
    17.                     set the data value of loop-block to 2
    18.                     stop
     
  9. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    I've put fences 360 degrees from me XD non of them changed.
     
  10. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,124
    Likes Received:
    164
    Ok well then I really don't know, the last code I sent, works for me, if the fence is in either direction
     
  11. HKPNW-Owner

    HKPNW-Owner Active Member

    Joined:
    Feb 2, 2017
    Messages:
    29
    Likes Received:
    0
    So i'm thinking it is the problem of skript's version/addons.
     
  12. Efnilite

    Supporter

    Joined:
    May 12, 2018
    Messages:
    218
    Likes Received:
    14
    Medals:
    Can you say your addons, what version you are running and your Skript version (dont say 'latest')
     
Thread Status:
Not open for further replies.
Loading...