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

Solved Pass NPC Name as function parameter

Discussion in 'Skript' started by wesnoah3, Jan 5, 2019.

  1. w

    wesnoah3 Well-Known Member

    Joined:
    Aug 18, 2017
    Messages:
    60
    Likes Received:
    3
    Hey everyone, I'm wondering how I can get the name of the NPC that was right-clicked previously to pass to my function. Heres what I'm thinking but I can't get it to work: https://pastebin.com/SQSCwERJ . Thanks

     
  2. Best Answer:
    Post #3 by wesnoah3, Jan 11, 2019
  3. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,529
    Likes Received:
    101
  4. w

    wesnoah3 Well-Known Member

    Joined:
    Aug 18, 2017
    Messages:
    60
    Likes Received:
    3
    I tried both expressions without success and can't seem to find an example that applies to my issue. Here is both pieces I tried: https://pastebin.com/8MZukvvx
    --- Double Post Merged, Jan 7, 2019, Original Post Date: Jan 6, 2019 ---
    Bump
    --- Double Post Merged, Jan 9, 2019 ---
    Bump
    --- Double Post Merged, Jan 11, 2019 ---
    Bump
    --- Double Post Merged, Jan 11, 2019 ---
    For future reference:
    Code (Skript):
    1. on rightclick on a entity:
    2.     clicked entity's display name contains "NPCNAME":
    3.         set {_test} to clicked entity's display name
    4.         send "%{_test}%" to player
    Big thanks to Runakaiᵇᵒᵗ on discord for the solution
     
Loading...