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!


    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.

Help needed. Confusion is afoot

Discussion in 'Skript' started by Brebro, Aug 11, 2019.

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

    Brebro Member

    Aug 10, 2019
    Likes Received:
    So to describe what my problem is you (the reader) needs to know what Capture the flag is (if you live under a rock).
    CTF in short:
    1: Teams of players (usually only 2 teams) try to capture (by breaking) other teams flag
    2: Teams are meant to PvP to prevent this from happening.
    3: Once captured the enemies wool has to be delivered back to base
    4: If killed while the Flag is in hand, it is dropped on death (in my case placed at point of death)
    5: If enemy flag is laying on ground. break to grab and carry on.
    (this \/is where my problem lies)
    6: If friendly flag is laying on ground. break it to put it back at place of origin.
    Code (Text):
    1. #{crf.loc} = current red flag location (where is was dropped)
    2. #{rf.loc} = where the flag should be at base
    3. on break of red wool or blue wool:
    4.     if block is red wool:
    5.         if {team.%player%} is "red":
    6.             if location is {crf.loc}:
    7.                 set block at {rf.loc} to red wool
    8.  #below here the code works fine
    9.             if location is {rf.loc}:
    10.                 message "{@pref} You cant break your own flag."
    11.                 cancel event
    I must either be Completely blind or something is severely wrong. I've had 3 people look at my skript with no luck so far.
    If you feel obligated here is the full code (NOTE: I have not finished coding the blue flag as I wanted to figure out the problem first, so in testing only use red flag): https://pastebin.com/LEfaLe6w
    I am brand new to Skript, I only know python so I felt as if this would be a cool transition into a game I play often.
    --- Double Post Merged, Aug 12, 2019, Original Post Date: Aug 11, 2019 ---
    Delete please, Fixed
Thread Status:
Not open for further replies.

Share This Page