Solved Projectile Burst

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

PolduZ

Member
Oct 2, 2020
31
2
8
Hey! Im looking for a way to rotate a projectile after it has been shot:
Code:
loop 10 times:
    set {_random} to random integer between -15 and 15
    shoot an arrow from {loc} at speed 1.2
#something like this:
    change rotation of last spawned entity by {_random}
my skript addons:
-skbee
-skquery
I looked everywhere and i couldn't find the answer.
 
Code:
loop 10 times:
    set {_vector} to vector((random number between -1 and 1),(random number between -1 and 1),(random number between -1 and 1))
    shoot an arrow from {loc} at speed 1.2 {_vector}
 
Thank you so much!
[doublepost=1665515531,1665515303][/doublepost]Unfortunately the particles lose their speed. I want them to still shoot in direction a player is looking at and then rotate them a little bit to create a burst effect
 
Thank you so much!
[doublepost=1665515531,1665515303][/doublepost]Unfortunately the particles lose their speed. I want them to still shoot in direction a player is looking at and then rotate them a little bit to create a burst effect
mb something like that

Code:
loop 10 times:
    set {_loc} to {loc}
    set yaw of {_loc} to yaw of {_loc} + (random number between -15 and 15)
    set pitch of {_loc} to pitch of {_loc} + (random number between -15 and 15)
    shoot an arrow from {_loc} at speed 1.2
We can also use push %entity% ... After shoot
But its little broken in Skript. In effect 'shoot %projectile%' projectile pushed in uncontrolled direction. So we have only that way - change pitch, yaw
 
Last edited:
wow.. it was that simple all along. Well thanks for helping me, I never played with rotations in sk before and now I know how to use them!
 
I aleardy tried push :emoji_stuck_out_tongue: i have one more question: How do i change the speed of a projectile the burst effect is kind of 2d.
[doublepost=1665516988,1665516752][/doublepost]Nvm im stupid xD
Code:
set {_random} to random integer between 1 and 2
shoot an arrow from {_loc} at speed {_random}
 
I aleardy tried push :emoji_stuck_out_tongue: i have one more question: How do i change the speed of a projectile the burst effect is kind of 2d.
I understand what you want, mmm.. Disable gravity of every spawned arrow and decrease starting speed, the simplest way
[doublepost=1665517078,1665516995][/doublepost]
I aleardy tried push :emoji_stuck_out_tongue: i have one more question: How do i change the speed of a projectile the burst effect is kind of 2d.
[doublepost=1665516988,1665516752][/doublepost]Nvm im stupid xD
Code:
set {_random} to random integer between 1 and 2
shoot an arrow from {_loc} at speed {_random}
Ah, you edited post, what you mean about '2d'?
 
I understand what you want, mmm.. Disable gravity of every spawned arrow and decrease starting speed, the simplest way
I aleardy got it, but that is an interesting way!
[doublepost=1665517150,1665517080][/doublepost]
I understand what you want, mmm.. Disable gravity of every spawned arrow and decrease starting speed, the simplest way
[doublepost=1665517078,1665516995][/doublepost]
Ah, you edited post, what you mean about '2d'?
Don't worry i already achieved the desired effect. Tysm for helping!
 
Status
Not open for further replies.