Conquer Factions Support

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

jackass

Member
Nov 8, 2017
16
0
0
23
Hello! I have been using conquer for a while now but I have run into an issue when trying to loop players radius.

All I want to do is loop players in radius (70 blocks), and if the relation between any of the loop players is enemy or neutral then x happens.

CURRENT CODE (ps. I set {faction.%player%} to the faction of the player in a previous event)

loop players in radius 70 of player
if relation between {faction.%player%} and loop-player is enemy:
 
Hello! I have been using conquer for a while now but I have run into an issue when trying to loop players radius.

All I want to do is loop players in radius (70 blocks), and if the relation between any of the loop players is enemy or neutral then x happens.

CURRENT CODE (ps. I set {faction.%player%} to the faction of the player in a previous event)

loop players in radius 70 of player
if relation between {faction.%player%} and loop-player is enemy:
you should put a semicolon ":" when looping
you have to ask the script to check the faction of loop-player instead of checking the loop-player.
code_language.skript:
loop players in radius 70 around player:
            loop-player is not player:
                if relation between {faction.%player%} and faction of loop-player is enemy:
                    #do something
                else:
                    #do something

or you can just use this instead of setting a variable to the player's faction

code_language.skript:
loop players in radius 70 around player:
            loop-player is not player:
                if relation between faction of player and faction of loop-player is enemy:
                    #do something
                else:
                    #do something
 
Status
Not open for further replies.