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

Solved FloatingTextParticle setText(), setTitle() or setInvisible() just don't work!

Discussion in 'Development' started by Kyd, Nov 16, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Don't work -> particle is still visible
    PHP:
    $particle = new FloatingTextParticle(new Vector3(x,y,z),"","Test");
    $level->addParticle($particle);
    $particle->setInvisible(true);
    Don't work -> Title isn't changed
    PHP:
    $particle = new FloatingTextParticle(new Vector3(x,y,z),"","Test");
    $level->addParticle($particle);
    $particle->setTitle('This is fuc**** not working');
    Don't work -> Text isn't changed
    PHP:
    $particle = new FloatingTextParticle(new Vector3(x,y,z),"","Test");
    $level->addParticle($particle);
    $particle->setText('This is fuc**** not working');
    Why?
     
  2. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    I tried using again adding the particle after changing text, but when I do this 2 times it add particle 2 times
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Oh it was happening because I was constructing particle object again and again.. :facepalm:
     
  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.