Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How They Do This? (Help)

Comments in 'Plugin Development' started by M3fansKingdom2, Jun 4, 2016.

  1. M3fansKingdom2
    Offline

    M3fansKingdom2 New Member

    Joined:
    Oct 30, 2015
    Posts:
    8
    Minecraft User:
    M3fansKingdom2
    Hi, I Got A Question. When I Saw To OwnagePE I Saw The Rainbow Particle Keep Circling The Player Pn The Spawn. Question:
    A. How They Got The Rainbow Particles?
    B. How The Rainbow Particle Keep Circling?
    Thats It!Please Reply. image.png
  2. korado531m7
    Offline

    korado531m7 Active Member

    Joined:
    Apr 4, 2015
    Posts:
    158
    Minecraft User:
    korado531m7
    Here's the full code.
    use the Scheduler (RepeatingTask), to keep

    PHP:
    //PlayerMoveEvent as $sender
    $sender $event->getPlayer();
    $level $sender->getLevel();
    $x $sender->x;
    $y $sender->y;
    $z $sender->z;
    $center = new Vector3($x$y$z);
    $radius 0.5;
    $count 100;
    $particle = new DustParticle($centermt_rand(), mt_rand(), mt_rand(), mt_rand()); //Color
    for($yaw 0$y $center->y$y $center->4$yaw += (M_PI 2) / 20$y += 20){
    $x = -sin($yaw) + $center->x;
    $z cos($yaw) + $center->z;
    $particle->setComponents($x$y$z);
    $level->addParticle($particle);
    There is the sample video.
    If you want to see, please reply me.
    But it's japanese
  3. M3fansKingdom2
    Offline

    M3fansKingdom2 New Member

    Joined:
    Oct 30, 2015
    Posts:
    8
    Minecraft User:
    M3fansKingdom2
    What Is RepeatingTask?Explain It Pls
  4. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Seriously you don't know what a repeating task is?!
    Go search in the forums
    applqpak likes this.
  5. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    PHP:
    public function onJoin(PlayerJoinEvent $event){
    $player $event->getPlayer();
    $level $player->getLevel();
    $xpos $player->getX();
    $ypos $player->getY();
    $zpos $player->getZ();
    $c = new Vector3($xpos$ypos$zpos);
    $sound = new BlazeShootSound($c);
    $level->addSound($sound);
    $r mt_rand();
    $g mt_rand();
    $b mt_rand();
    $a 1;
    $radius 0.5;
    $count 250;
    $particle = new DustParticle($c$r$g$b$a);
    for(
    $yaw 0$y $c->y$y $c->4$yaw += (M_PI 2) / 20$y += 20){
    $x = -sin($yaw) + $c->x;
    $z cos($yaw) + $c->z;
    $r mt_rand();
    $g mt_rand();
    $b mt_rand();
    $a 1;
    $particle = new DustParticle($c$r$g$b$a);
    $particle->setComponents($x$y$z);
    $level->addParticle($particle);
    }
    }
  6. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Why do you construct a particle you are never actually using?
  7. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    I think he wants it continuously spawning. A repeating task would be better for this.
    Muqsit and applqpak like this.
  8. DeathRaven359
    Offline

    DeathRaven359 New Member

    Joined:
    Mar 10, 2016
    Posts:
    20
    Minecraft User:
    DeathRaven359
    Understand you probs don't know PHP, but this is common sense.

    REPEATING TASK

    a TASK that REPEATS


    And is this your plugin?

    Attached Files:

    applqpak and Primus like this.

Share This Page

Advertisement