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.
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.
[doublepost=1565590573,1565499632][/doublepost]Delete please, Fixed
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:
#{crf.loc} = current red flag location (where is was dropped)
#{rf.loc} = where the flag should be at base
on break of red wool or blue wool:
if block is red wool:
if {team.%player%} is "red":
if location is {crf.loc}:
set block at {rf.loc} to red wool
#below here the code works fine
if location is {rf.loc}:
message "{@pref} You cant break your own flag."
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.
[doublepost=1565590573,1565499632][/doublepost]Delete please, Fixed