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.

ForceField

Discussion in 'Skript' started by Fridious, Jun 26, 2017.

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

    Fridious Member

    Joined:
    Jun 23, 2017
    Messages:
    33
    Likes Received:
    0
    How can I make that the forcefield push player without a permission 5 block away:
    My code
    Code (Skript):
    1.  
    2. command /forcefieldon:
    3.     trigger:
    4.         if player has permission "forcefield.use":
    5.             drawComplexCircle particle "redstone", RGB 5, 255, 193, center player, id "%player%-forcefield1", randomRotation true, radius .8, density 20, start 0, visibleRange 100, xRotation 23, yRotation 120, zRotation 0
    6.             drawComplexCircle particle "redstone", RGB 0, 255, 0, center player, id "%player%-forcefield2", randomRotation false, radius .8, density 20, start 0, visibleRange 100, xRotation 70, yRotation 10, zRotation 0
    7.             drawComplexCircle particle "redstone", RGB 255, 0, 0, center player, id "%player%-forcefield3", randomRotation false, radius .8, density 20, start 0, visibleRange 100, xRotation 0, yRotation 60, zRotation 0
    8.             drawComplexCircle particle "redstone", RGB 0, 0, 255, center player, id "%player%-forcefield4", randomRotation true, radius .8, density 20, start 0, visibleRange 100, xRotation 25, yRotation 54, zRotation 0
    9.             set {forcefield.%player%} to true
    10.                            
    11. command /forcefieldoff:
    12.     trigger:
    13.         set {forcefield.%player%} to false
    14.         stopEffect id "%player%-forcefield1"
    15.         stopEffect id "%player%-forcefield2"
    16.         stopEffect id "%player%-forcefield3"
    17.         stopEffect id "%player%-forcefield4"
    18.         stop
    19.  
    Thank you
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,173
    Likes Received:
    199
    (push|thrust) %entities% %direction% [(at|with) (speed|velocity|force) %number%]

    loop all player in radius 5 of player:
    loop-entity is not player
    push loop-entity from player

    Something like that
     
Thread Status:
Not open for further replies.
Loading...