1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Entity buttоn

Discussion in 'Development' started by SergeyIvanov, Nov 16, 2016.

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

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    How to add button when you see the entity?
     

    Attached Files:

  2. archie426

    archie426 Baby Zombie

    Messages:
    130
    GitHub:
    archie426
    Define 'button' please
     
  3. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    He means the button you see when facing for example a sheep, the button that shows up to cut off the wool.
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Btw post updated
    also since the words in pic is random it seem to not be client sided like i thought

    maybe worth checking fishing rod's code since on there it somehow sent the Fish popup so it isnt entity dependent either
     
    HimbeersaftLP and Kenn Fatt like this.
  5. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    @dktapps knows how to send this button as far as I'm concerned. I'm going to try to get him here...
     
    Last edited: Nov 17, 2016
    HimbeersaftLP likes this.
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    therefore it should be in the source code somewhere??
    right?
     
    HimbeersaftLP likes this.
  7. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    There are no API methods for doing this currently. However, you can do the following:

    PHP:
    $entity->setDataProperty(Entity::DATA_INTERACTIVE_TAGEntity::DATA_TYPE_STRING"whatever_you_want_on_the_button_here");
    Please however be aware that this will change in the future when entity implementation is rewritten.
     
    Reid, Skullex, imYannic and 1 other person like this.
  8. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    oh thanks!
    what about items that have "interactive tag" like fishing rod or it is client sided?
     
    HimbeersaftLP likes this.
  9. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    @Thunder33345 Good question, haven't the foggiest on that one. PocketMine lacks so many gameplay features it's difficult to test this stuff.
     
    Reid, HimbeersaftLP and Thunder33345 like this.
  10. Angel

    Angel Spider Jockey

    Messages:
    44
    GitHub:
    aimjel
    How do you check when a player taps this button?
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.