1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug Right click

Discussion in 'Developer Support' started by BruteForce, Mar 13, 2018.

Tags:
  1. BruteForce

    Joined:
    Feb 12, 2018
    Messages:
    48
    Likes Received:
    10
    Is there any way to right-click visible GameObjects / Players / GroundItems ?

    The click() function doesn't seem to have any parameters.

    (sorry for the incorrect tag, this is just a question not a bug, i can't change it)
     
  2. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    Use #interact instead.
    --- Double Post Merged, Mar 13, 2018, Original Post Date: Mar 13, 2018 ---
    Btw you should join Slack, as that's where most developers hang :)

    Join RuneMate Chat | RuneMate
     
    LucasSousa and BruteForce like this.
  3. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    As Auxi said, use interact method:
    Code (Text):
    1. InteractableEntity x = ....;
    2.  
    3. x.interact("some action from object");

    Interact method also returns a boolean value, then you can use it in a if block to check if the interaction was properly:
    Code (Text):
    1. InteractableEntity x = ....;
    2.  
    3. if (x.interact("any action")){
    4.     //do something like
    5.     //set mesage, camera move
    6.     //and so on
    7. }
     
  4. BruteForce

    Joined:
    Feb 12, 2018
    Messages:
    48
    Likes Received:
    10
    Thanks for the tips!
     
    LucasSousa likes this.

Share This Page

Loading...