Solved Making enderman-like particles with around player

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Allan Noyd

Member
Apr 29, 2021
48
0
6
23
I was wondering about this cool feature that my skript could have for certain enderman-related player.
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?
 
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:
every 0.5 second:
    loop all players where [input is {Endm8}:
        set {EM8.VFX.RN} to random integer between 0 and 2
 
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:
every 0.5 second:
    loop all players where [input is {Endm8}:
        set {EM8.VFX.RN} to random integer between 0 and 2
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.
 
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.
Yes of course :emoji_slight_smile:

Here is an example of how I use vectors to make the particles appear a certain way
Code:
play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 0, 0) with extra 0
That requires SkBee btw.
[doublepost=1620309281,1620308896][/doublepost]I forgot to say, the values of
Code:
vector(0, 0, 0)
are
Code:
vector(x, y, z)
So you just need to replace the x, y and z coordinates accordingly
 
Yes of course :emoji_slight_smile:

Here is an example of how I use vectors to make the particles appear a certain way
Code:
play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 0, 0) with extra 0
That requires SkBee btw.
[doublepost=1620309281,1620308896][/doublepost]I forgot to say, the values of
Code:
vector(0, 0, 0)
are
Code:
vector(x, y, z)
So you just need to replace the x, y and z coordinates accordingly
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.
 
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.
No, vector(1, 1, 1) will move particles in 1 block away in x, y and z
 
Yes, I meant "specific location". So to randomize position of particle, you can use random vector, right?
Yes, something like this, howeveer there most likely is a more optimized way of randomizing it
Code:
chance of 20:
    play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 0, 0) with extra 0
chance of 20:
    play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 1, 0) with extra 0
chance of 20:
    play 10 of dust using dustOption(red, 1) above loop-player offset by vector(0, 0, 1) with extra 0
chance of 20:
    play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 0, 1) with extra 0
chance of 20:
    play 10 of dust using dustOption(red, 1) above loop-player offset by vector(1, 1, 1) with extra 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?
 
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?
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
 
Well technically, if I colour the dust purple... It could seem like enderman particle...
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 :emoji_slight_smile:
 
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 :emoji_slight_smile:
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 :emoji_slight_smile:
[doublepost=1620316933,1620313903][/doublepost]
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 :emoji_slight_smile:
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
 
Status
Not open for further replies.