Solved Check what head player is clicking on

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

Davi3684

Member
Dec 29, 2017
15
0
0
21
Full Code:
on right click on head:
if clicked block is head of Wooomfy:
message "Computer"

I just can't seem to find a way to check what head the player is clicking on.
if the player clicks on a specific head, then the player would execute a command or receive a message. but I just can't seem to figure it out. I hope one of you can help =)

Thanks

The error I get on reload: 'Wooomfy' is not an entity type


Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
 
if clicked block is head of Wooomfy parsed as offline player:

may work. I Can't test the skript atm
 
I could make that you have to put manually who's head it is but i can't figure out how to check the player's head without manually putting there the information and then click it
 
code_language.skript:
on right click on head:
    clicked block is skull of "Wooomfy" parsed as a offline player
    message "Computer"
not tested
 
I don't think it is possible to do it that way, a thing you can do, is setting a variable like this '{skull.%location of event-block%}'.
 
Might not help but test;
code_language.skript:
on right click:
  if event-block is a head:
    if clicked block is skull of "Wooomfy" parsed as a offline player:
      message "Computer"
 
Might not help but test;
code_language.skript:
on right click:
  if event-block is a head:
    if clicked block is skull of "Wooomfy" parsed as a offline player:
      message "Computer"


Again no erros but doesn't do anything when i click on it
 
So the problem is in the clicked block event. Docs might help you with that event, ill try to figure out
 
code_language.skript:
on place of head:
    if name of player's tool is "&3&lComputer":
        set {gadget.%event-block%} to "Computer"

on right click on head:
    if {gadget.%event-block%} is set:
        if {gadget.%event-block%} is "Computer":
            message "Using Computer"

on break of head:
    if {gadget.%event-block%} is "Computer":
        clear {gadget.%event-block%}
        message "Computer removed"

This seems to work.

Thanks for the help, to all of you =)
 
Status
Not open for further replies.