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

Spawning invisibles entities.

Discussion in 'Development' started by DanielYTK, Feb 10, 2017.

  1. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Is there any way to spawn invisible entities for only 1 player?
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    PHP:
    /** @var Entity $entity */
    /** @var Player $player */
    $entity->despawnFrom($player);
     
  3. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    That's not an invisible entity. It's a despawned entity.
     
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Still can be categorized as an invisible entity -.-

    Another way:
    PHP:
    $entity->setDataFlag(Entity::DATA_FLAGSEntity::DATA_FLAG_INVISIBLEtrue);
     
  5. kaliiks

    kaliiks Zombie

    Messages:
    250
    No, cant be categorized as invisible entity $entity->despawnFrom($player); and $entity->setDataFlag(Entity::DATA_FLAGS, Entity::DATA_FLAG_INVISIBLE, true); make it invisible if it is despawned player cant damage it etc so it remove
     
  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.