I need help with simple Skript

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

Noahrobs

Member
Jul 13, 2017
12
0
0
24
on rightclick:
if player is holding a diamond:
if player is in world "Game2":
play sound

I started this script not knowing how to finish it, i searched tutorials up on yt but no use.
how would I make it so when I right click a diamond it plays sound by all nearby players except the person who clicked it.. if thats too advanced when right click named item scare all nearby enemies.. Im using 1.8.8 btw for testing purposes. xD
 
code_language.skript:
on right click:
    if player is holding diamond:
        if world is "world_nether":
            play "ENTITY_PLAYER_LEVELUP" to player with volume 1 and pitch 2
 
code_language.skript:
on right click:
    if player is holding diamond:
        if world is "world_nether":
            play "ENTITY_PLAYER_LEVELUP" to player with volume 1 and pitch 2
I mean that'll only be for that player, how could I put it so it effects all nearby players like @a[r=5]
 
code_language.skript:
on rightclick:
    if player is holding diamond:
        if player is in world "Game2":
            play sound "ENTITY_PLAYER_LEVELUP" at player's location with volume 1 and pitch 1
 
you would just loop the players in the desired radius, then play the sound at them using "loop-player" instead of player like this
code_language.skript:
on right click:
    if player is holding diamond:
        if world is "world_nether":
        loop players is radius 10:
            play "ENTITY_PLAYER_LEVELUP" to loop-player with volume 1 and pitch 2
 
  • Like
Reactions: Noahrobs
you would just loop the players in the desired radius, then play the sound at them using "loop-player" instead of player like this
code_language.skript:
on right click:
    if player is holding diamond:
        if world is "world_nether":
        loop players is radius 10:
            play "ENTITY_PLAYER_LEVELUP" to loop-player with volume 1 and pitch 2
So close its just it says "Players in radius 10 is not an entity type".. thanks so much for the help btw means alot :emoji_wink:
 
Status
Not open for further replies.