# Solved Making enderman-like particles with around player

Discussion in 'Skript' started by Allan Noyd, Apr 29, 2021.

Not open for further replies.
1. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
But could not figure out how I can stop the portal effect to move in predetermined line and rain on the player just from one angle. Apparently %direction% does not affect the effects direction.
Here's my work (not working):

every 0.5 second:
loop all players:
loop-player is {Endm8}
set {EM8.VFX.RN} to random integer between 0 and 2
loop blocks in radius {EM8.VFX.RN} around loop-player:
chance of 50%:
play portal north loop-block
chance of 50%:
play portal south loop-block
chance of 50%:
play portal west loop-block
chance of 50%:
play portal east loop-block

Any ideas?

#1
Post #10 by Deleted member 9590, May 6, 2021
3. ### Deleted member 9590 Guest

you can use vectors do give directions
Also looping all players every 0,5 seconds seems a bit excessive considering you can just do this
Code (Text):
1. every 0.5 second:
2.     loop all players where [input is {Endm8}:
3.         set {EM8.VFX.RN} to random integer between 0 and 2

#2
4. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
I didn't play around with vectors a lot. Can you suggest any exact instances (if I may kindly ask)? Also sorry for long response time. I forgot about this for a while.

#3
5. ### Deleted member 9590 Guest

Yes of course

Here is an example of how I use vectors to make the particles appear a certain way
Code (Text):
1. play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 0, 0) with extra 0
That requires SkBee btw.
--- Double Post Merged, May 6, 2021, Original Post Date: May 6, 2021 ---
I forgot to say, the values of
Code (Text):
1. vector(0, 0, 0)
are
Code (Text):
1. vector(x, y, z)
So you just need to replace the x, y and z coordinates accordingly

#4
6. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
So directing particles and effects needs an addon on its own. Thanks. How I understand now vectors is that it is xyz relative to the player instead of normal coordinates? But should not there be another something for movement? Because it seems like they all should move in one direction, where it comes down to the problem I had- raining portal particle separate streams, only from one angle.

EDIT: Still thanks tho, for quick response.

#5
7. ### Deleted member 9590 Guest

No, vector(1, 1, 1) will move particles in 1 block away in x, y and z

#6
8. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
From player, right?

#7
9. ### Deleted member 9590 Guest

that depends, it could be "above player", "under player" "from player" ect.

#8
10. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
Yes, I meant "specific location". So to randomize position of particle, you can use random vector, right?

#9
11. ### Deleted member 9590 Guest

Yes, something like this, howeveer there most likely is a more optimized way of randomizing it
Code (Text):
1. chance of 20:
2.     play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 0, 0) with extra 0
3. chance of 20:
4.     play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 1, 0) with extra 0
5. chance of 20:
6.     play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 0, 1) with extra 0
7. chance of 20:
8.     play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 0, 1) with extra 0
9. chance of 20:
10.     play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 1, 1) with extra 0

#10
12. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
I don't really care about optimization (and all my redstone, code and anything else; looks like it lol). What does the 1 in bracket after "red" do/stand for?

#11
13. ### Deleted member 9590 Guest

that's the intensity of the color red, however this is just for that one particle type,and some more most likely, I just used it because it's on the docs

See here some particle types https://skripthub.net/docs/?id=4542

#12
14. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
Well technically, if I colour the dust purple... It could seem like enderman particle...

#13
15. ### Deleted member 9590 Guest

Well I guess you are going to have to do some testing there, but if you found my anwser usefull, I would greatly appreciate if you marked one of my anwsers as "best anwser", also you can add the tag "solved" if everything works as it should

#14
16. ### Allan Noyd Member

Joined:
Apr 29, 2021
Messages:
38
0
I will try to play around with it. For now I will leave it unsolved If anyone would have some another approach, but for the time being thanks
--- Double Post Merged, May 6, 2021, Original Post Date: May 6, 2021 ---
End result (for future people who would mind):

every 0.5 second:
loop all players:
loop-player is {Endm8}
chance of 20:
play 10 of portal above loop-player offset by vector(1, 0, 0) with extra 0
chance of 20:
play 10 of portal above loop-player offset by vector(0, 1, 0) with extra 0
chance of 20:
play 10 of portal above loop-player offset by vector(0, 0, 1) with extra 0
chance of 20:
play 10 of portal above loop-player offset by vector(1, 0, 1) with extra 0
chance of 20:
play 10 of portal above loop-player offset by vector(1, 1, 1) with extra 0

#15
Not open for further replies.

Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.
• ### Support skUnity

The staff team works very hard to make sure the community is running its best. This means constantly performing upgrades to systems and other features. This does cost a bit of money to keep doing. Donating to skUnity would allow the server to keep running smoothly for years to come!

Support Us!