Directional Spirals

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

McAcrylic

Active Member
Oct 21, 2017
59
0
0
25
Basically, what I need help with creating a spiral in the facing direction.
Something like this....
4d295b486ae2dc085c3a87caf765dcbf.png

d2390baccd1fd883fd642452439c6c32.png

47023d27fb6eb587a7138efb402cad4e.png

295d27a0b3620440f2a7f817d5f432ad.png



But instead of using blocks, replace it with particles. Basically a smooth spiral going towards a certain direction for x seconds. I have tried very inefficient methods, which either made the spiral not smooth, or glitchy.
 
Well, Ive dived into the code of that skript, however, even though I am using the latest version of skript, functions do not work for me, and that is why i am trying to avoid using functions. If you were to be so kind and get me the code for what I need, it would be much appreciated!
How do functions not work for you?
You call functions by using
code_language.skript:
myFunction(player)

not:
function myFunction(player)
 
Last edited:
If you have the latest version of Bensku's Skript fork and functions aren't working you should create an issue about it on the github page from Bensku's fork (so ONLY if you have 2.2-dev36)
 
And again, I am pointing out the fact that I need help with my initial objective not this.
And the answer to your problem is the SexyShapes script, which you can use by using functions, and for functions you need the latest version of Skript and if that version doesn't run functions you have to create an issue about it on the github page. Conclusion: get the latest skript fork version and use SexyShapes.
 
Last edited:
And the answer to your problem is the Sexi Shapes script, which you can use by using functions, and for functions you need the latest version of Skript and if that version doesn't run functions you have to create an issue about it on the github page. Conclusion: get the latest skript fork version and use SexyShapes.
I really have no experience with functions and it doesnt my question, how to make it so it spirals in the target direction
 
I really have no experience with functions and it doesnt my question, how to make it so it spirals in the target direction
My friend, if you don't know how to use functions in Skript, you can ask for that! There are enough examples for functions online. Also I don't really get why you want to refuse SexyShapes as a solution, because the only explanations you gave were that the functions weren't working. If they don't work, update your Skript version and if that doesn't work, as help about the functions. The solution to your problem has already been given here, but you just refuse to accept it. Even if you want to use SexyShapes but you can't, ask about that!
 
My friend, if you don't know how to use functions in Skript, you can ask for that! There are enough examples for functions online. Also I don't really get why you want to refuse SexyShapes as a solution, because the only explanations you gave were that the functions weren't working. If they don't work, update your Skript version and if that doesn't work, as help about the functions. The solution to your problem has already been given here, but you just refuse to accept it. Even if you want to use SexyShapes but you can't, ask about that!
Again, I have never avoided using SexyShapes, never ruled out of it.
I initially asked for help to create these spirals, and the code would be much appreciated.

FYI, I did say I am not very good with functions, and I would love if you showed me an example for SexyShapes.

Specifically, I am looking for how to make these spirals with particles, if thats possible.
 
Again, I have never avoided using SexyShapes, never ruled out of it.
I initially asked for help to create these spirals, and the code would be much appreciated.

FYI, I did say I am not very good with functions, and I would love if you showed me an example for SexyShapes.

Specifically, I am looking for how to make these spirals with particles, if thats possible.
Okay what particles do you want?
[doublepost=1531474987,1531474469][/doublepost]
Again, I have never avoided using SexyShapes, never ruled out of it.
I initially asked for help to create these spirals, and the code would be much appreciated.

FYI, I did say I am not very good with functions, and I would love if you showed me an example for SexyShapes.

Specifically, I am looking for how to make these spirals with particles, if thats possible.
I just went for smoke, you can change it if you want to (I already implemented and edited the SexyShapes script, you don't need to have it installed)
code_language.skript:
command /helix:
    trigger:
        set {_loc} to location of player
        set {_radius} to 3
        set {_angle} to 20
        set {_ascend} to 12
        set {_size} to 30
        set {_locs::*} to helix2({_loc}, {_radius}, {_angle}, {_ascend}, {_size})
        loop {_locs::*}:
            play smoke on loop-value   
            
function helix2(location: location, radius: number, angle: number, ascend: number, size: number) :: locations:
    set {_height} and {_current} to 0
    while {_height} is less than {_size}:
        add {_ascend} / (360 / {_angle}) to {_height}
        add {_angle} to {_current}
        set {_l} to {_location}
        add (cos ({_current} / 180) * 3.14159265358979323846) * {_radius} to y-loc of {_l}
        add {_height} to x-loc of {_l}
        add (sin ({_current} / 180) * 3.14159265358979323846) * {_radius} to z-loc of {_l}
        add {_l} to {_l::*}
    return {_l::*}
 
Okay what particles do you want?
[doublepost=1531474987,1531474469][/doublepost]
I just went for smoke, you can change it if you want to (I already implemented and edited the SexyShapes script, you don't need to have it installed)
code_language.skript:
command /helix:
    trigger:
        set {_loc} to location of player
        set {_radius} to 3
        set {_angle} to 20
        set {_ascend} to 12
        set {_size} to 30
        set {_locs::*} to helix2({_loc}, {_radius}, {_angle}, {_ascend}, {_size})
        loop {_locs::*}:
            play smoke on loop-value  
           
function helix2(location: location, radius: number, angle: number, ascend: number, size: number) :: locations:
    set {_height} and {_current} to 0
    while {_height} is less than {_size}:
        add {_ascend} / (360 / {_angle}) to {_height}
        add {_angle} to {_current}
        set {_l} to {_location}
        add (cos ({_current} / 180) * 3.14159265358979323846) * {_radius} to y-loc of {_l}
        add {_height} to x-loc of {_l}
        add (sin ({_current} / 180) * 3.14159265358979323846) * {_radius} to z-loc of {_l}
        add {_l} to {_l::*}
    return {_l::*}
Finally! Thank you for your help!
 
Status
Not open for further replies.