1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Solved Making enderman-like particles with around player

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

Thread Status:
Not open for further replies.
  1. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    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?

     
  2. Best Answer:
    Post #10 by Deleted member 9590, May 6, 2021
  3. 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
     
  4. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    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.
     
  5. Yes of course :emoji_slight_smile:

    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
     
  6. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    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.
     
  7. No, vector(1, 1, 1) will move particles in 1 block away in x, y and z
     
  8. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    From player, right?
     
  9. that depends, it could be "above player", "under player" "from player" ect.
     
  10. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    Yes, I meant "specific location". So to randomize position of particle, you can use random vector, right?
     
  11. 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
     
  12. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    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?
     
  13. 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
     
  14. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    Well technically, if I colour the dust purple... It could seem like enderman particle...
     
  15. 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:
     
  16. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    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 :emoji_slight_smile:
    --- 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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...