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.

Easy fix // Skript problem

Discussion in 'Skript' started by Noahrobs, Aug 19, 2017.

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

    Noahrobs Member

    Joined:
    Jul 13, 2017
    Messages:
    12
    Likes Received:
    0
    Code (Skript):
    1. on right click:
    2.     if player is in "Prison":
    3.         if targeted block is stone brick:
    4.             set targeted block to redstone block
    5.             wait 5 seconds
    6.             if the targeted block is redstone block:
    7.                 set targeted block to stone brick
    8.        
    9. on left click:
    10.     if player is in "Prison":
    11.         if targeted block is redstone block:
    12.             set targeted block to air
    How do I change this so it sets the targeted block back to stonebrick after it being redstone block.. ( Right click ) Cause if you look away while it does its magic it doesnt change back that meaning it changes into a redstone block forever.. ;-;
    --- Double Post Merged, Aug 19, 2017, Original Post Date: Aug 19, 2017 ---
    Bump.. ;-;
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    You can bump all every 24 hours / one days. We are not robots.


    To your fix. Save the target block location into variables.
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Yeah ik, Could you explain a little better I was gonna do that but wouldnt the server lag if it has too much variables or is it fine.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    I hear, one got already 1.000.000 Variables and still isn't lagging. Its just took maybe 2ms More loading. or what ever i don't understand :'D So, you don't have worry about variables. btw for your events its "Local variables" enough.

    just set like this way

    Code (Skript):
    1. set {_loc} to location of target block
    2. wait 5 seconds
    3. if block at {_loc} is redstone block:
    4.     set block at {_loc} to stone brick
     
Thread Status:
Not open for further replies.

Share This Page

Loading...