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

Particle

Discussion in 'Development' started by BlawoHD, Mar 23, 2019.

  1. BlawoHD

    BlawoHD Silverfish

    Messages:
    21
    how do i make walking particle?
     
  2. DragonBoy

    DragonBoy Creeper

    Messages:
    4
    GitHub:
    DragonBoyHD
    You can do it in PlayerMoveEvent by obtaining the player's coordinates

    public function onParticle(PlayerMoveEvent $event){ $player = $event->getPlayer(); $x = $player->getX(); $y = $player->getY(); $z = $player->getZ(); $level = $this->getServer()->getLevelByName($player->getLevel()->getFolderName());
    //$level->addParticle($partcile(vector3)) Example DustParticle
    $level->addParticle(new DustParticle(new Vector3($x,$y,$z), mt_rand(219, 255), mt_rand(0, 20), mt_rand(180, 203)));
    }
     
  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.