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. Offline

### M3fansKingdom2New Member

Joined:
Oct 30, 2015
Posts:
8
Minecraft User:
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?
2. Offline

Joined:
Apr 4, 2015
Posts:
158
Minecraft User:
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(\$center, mt_rand(), mt_rand(), mt_rand(), mt_rand()); //Colorfor(\$yaw = 0, \$y = \$center->y; \$y < \$center->y + 4; \$yaw += (M_PI * 2) / 20, \$y += 1 / 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. Offline

### M3fansKingdom2New Member

Joined:
Oct 30, 2015
Posts:
8
Minecraft User:
What Is RepeatingTask?Explain It Pls
4. Offline

### Tim // robske BübaNotable Member

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

### MuqsitActive Member

Joined:
Sep 9, 2015
Posts:
175
Minecraft User:
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->y + 4; \$yaw += (M_PI * 2) / 20, \$y += 1 / 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. Offline

### Tim // robske BübaNotable Member

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

### Hotshot_9930Notable MemberPlugin Developer

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

### DeathRaven359New Member

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

a TASK that REPEATS

And is this your plugin?

#### Attached Files:

• ###### ParticlesPlus_v0.0.2 (1).phar
File size:
1.7 KB
Views:
12
applqpak and Primus like this.