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

Particles

Comments in 'Plugin Development' started by NycuRO, Apr 25, 2016.

  1. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    How create this particle?

    Is not spiral,is one circle inclined at 45 degrees ...

    How create @PEMapModder ,you know..
    And how add one particle blue ,one mauve , one blue,one mauve..

    Attached Files:

  2. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    PeMapModder Is Leave :(
    And How Can Color Particle
    use
    PHP:
    new DustParticle(new Vector3($x,$y$z),$r,$g,$b);
  3. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    I know,but is online on forum for help others
  4. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Use a task and the parametric equation of a circle, then add a little amount to y every time. If you don't know what a parametric equation is, then please learn it and don't ask here.
  5. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    Thanks for null... You are best..
  6. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    and encouragement that you give all beginners who want to learn
  7. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    Thanks my friend...
    even you help me with something , others are greedy to say
  8. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Ehm, what? Do you really want me to explain a part of math here? You have to learn that by your own, this is not a maths forum. Please search information about what I told you before answering.
    This is the parametric equation of a circle
    PHP:
    cos(t)
    sin(t)
    If you know about parametric equations, you will know what t is.
  9. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    Yes,is ecuation. But get syntax error : ' ' and Idk...
  10. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    Not ' exemple ' , give ' ' ( enought text )
  11. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Might give us the code? We cannor look into your plugin without having it.
  12. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    One,two minutes stay pls for recreating because i'm deleting because not work.
  13. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    $center = new Vector3(1, 1, 1);
    $radius = 0.5;
    $count = 100;
    $particle = new WhateverParticle($center);
    for($i = 0; $i < $count; $i++){
    $pitch = (mt_rand() / mt_getrandmax() - 0.5) * M_PI;
    $yaw = mt_rand() / mt_getrandmax() * 2 * M_PI;
    $y = -sin($pitch);
    $delta = cos($pitch);
    $x = -sin($yaw) * $delta;
    $z = cos($yaw) * $delta;
    $v = new Vector3($x, $y, $z);
    $p = $center->add($v->normalize()->multiply($radius));
    $particle->setComponents($p->x, $p->y, $p->z);
    $level->addParticle($particle);
    }

    It's all code,but not work. Get error syntax on line with mt_rand : ' '
  14. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Do not just copy code. If you really do not know what the error is, then either learn PHP, or if you (in your opinion) did that alreay, realise that plugin development isn't a gold fit for you.

    Also, there are two mt_rands(), and please post the full error when asking for help.
    Last edited: Apr 26, 2016
    Survingo likes this.
  15. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    you just you kidding me
  16. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    First and two mt_rand line have this problem : syntax error : ' '
  17. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    You know, I do not want to argue a shit plugin. I want to be friends , but if I ask you more about the code? I'm sure if you ask the PeMapModder help me . He always help everyone , everyone loved him because of that . Now remained immature nonsense greedy and envious of other software that are better than pm , which does not help anyone. And yes , you are one of those and so does Primus
  18. korado531m7
    Offline

    korado531m7 Active Member

    Joined:
    Apr 4, 2015
    Posts:
    158
    Minecraft User:
    korado531m7
    PHP:
    $player $event->getPlayer();
    $level $player->getLevel();
    $x X;
    $y Y;
    $z Z;
    $center = new Vector3($x$y$z);
    $radius 0.5;
    $count 100;
    $particle = new DustParticle($centermt_rand(), mt_rand(), mt_rand(), mt_rand());
    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);
  19. NycuRO
    Offline

    NycuRO Active Member

    Joined:
    Oct 19, 2015
    Posts:
    64
    Minecraft User:
    NycuRK
    I have this code. Is player Spiral. Need for level..
  20. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221

Share This Page

Advertisement