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

Change the head of the skin

Discussion in 'Development' started by McpeBooster, Jan 15, 2018.

  1. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    Does anyone have an idea how to change a player's head to that of another player, not the rest of the skin?

    So: I want player1 to get his skin modified so that he has his own again, only the head part is the head of player2.


    It would have to be possible to modify only parts of one skin and replace them with another...
     
  2. kenygamer

    kenygamer Banned Banned

    Messages:
    106
    GitHub:
    kenygamer
    Take a look at the Human class (which is inherited by the Player class), getSkin() and setSkin() methods. As you may know, that means you can use Player->getSkin() and Player->setSkin().

    To answer your question: I don't know, I never tried something like that.
     
  3. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    Yes I know this functions, but I only want to change the head part of the skin
     
  4. kenygamer

    kenygamer Banned Banned

    Messages:
    106
    GitHub:
    kenygamer
  5. xZeroMCPE

    xZeroMCPE Witch

    Messages:
    67
    GitHub:
    xZeroMCPE
    Code:
    $player->getSkin();
    
    // Returns pocketmine\entity\Skin
    And I think you can mess around with the skin geometry.
     
    SmallkingDev and kenygamer like this.
  6. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    Oh thanks. I will try tomorrow to play with geometry :D
     
  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.