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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
this guys just want "Realisitc" rotate, Ever 1 ticks or 10 ticks or what ever, 1x roatet around, He can just look the code, Its simple. he should:That would just rotate an amour stand around itself, no?
add "{Rotation:360f}" to nbt of target entity
this guys just want "Realisitc" rotate, Ever 1 ticks or 10 ticks or what ever, 1x roatet around, He can just look the code, Its simple. he should:
code_language.skript:add "{Rotation:360f}" to nbt of target entity
around the player
Oh... right... well... its maybe little Hard.idk man, I'm pretty sure he wan't the armour stand to rotate around the player, kinda like an orbit.
Yes, i want rotate like an orbit, anyone know how?
command /orbit:
trigger:
set {x} to 0
set {radius} to 10
set {top_half_of_circle} to true
set {orbiting} to true
while {orbiting} is true:
set {circle_center} to player's location
delete last spawned armor stand
set {z} to sqrt(({radius}^2)-{x}^2)
if {bottom_half_of_circle} is true:
set {z} to {z} * -1
set {loc} to location at ({circle_center}'s x-coord + {x}), ({circle_center}'s y-coord + 1), ({circle_center}'s z-coord + {z})
set block at {loc} to armor stand
spawn an armor stand at {loc}
add "{NoGravity:1}" to nbt of last spawned armor stand
if {top_half_of_circle} is true:
add 0.5 to {x}
if {x} is greater than {radius}:
remove 0.5 from {x}
set {bottom_half_of_circle} to true
set {top_half_of_circle} to false
else if {bottom_half_of_circle} is true:
remove 0.5 from {x}
if {x} is less than ({radius} * -1):
add 0.5 to {x}
set {top_half_of_circle} to true
set {bottom_half_of_circle} to false
wait 1 tick
command /orbit:
trigger:
set {x} to 0
set {radius} to 10
set {top_half_of_circle} to true
set {orbiting} to true
spawn an armor stand at player's location
set {_a} to spawned armor stand
while {orbiting} is true:
set {circle_center} to player's location
set {z} to sqrt(({radius}^2)-{x}^2)
if {bottom_half_of_circle} is true:
set {z} to {z} * -1
set {loc} to location at ({circle_center}'s x-coord + {x}), ({circle_center}'s y-coord + 1), ({circle_center}'s z-coord + {z})
teleport {_a} to {loc}
add "{NoGravity:1}" to nbt of {_a}
if {top_half_of_circle} is true:
add 0.5 to {x}
if {x} is greater than {radius}:
remove 0.5 from {x}
set {bottom_half_of_circle} to true
set {top_half_of_circle} to false
else if {bottom_half_of_circle} is true:
remove 0.5 from {x}
if {x} is less than ({radius} * -1):
add 0.5 to {x}
set {top_half_of_circle} to true
set {bottom_half_of_circle} to false
wait 1 tick
so here's a picture of the path of the armorstand:Thank you, it comes close to what I'm looking for, but is there any way to make it always go at the same speed?
code_language.skript:command /orbit: trigger: set {x} to 0 set {radius} to 10 set {top_half_of_circle} to true set {orbiting} to true spawn an armor stand at player's location set {_a} to spawned armor stand while {orbiting} is true: set {circle_center} to player's location set {z} to sqrt(({radius}^2)-{x}^2) if {bottom_half_of_circle} is true: set {z} to {z} * -1 set {loc} to location at ({circle_center}'s x-coord + {x}), ({circle_center}'s y-coord + 1), ({circle_center}'s z-coord + {z}) teleport {_a} to {loc} add "{NoGravity:1}" to nbt of {_a} if {top_half_of_circle} is true: add 0.5 to {x} if {x} is greater than {radius}: remove 0.5 from {x} set {bottom_half_of_circle} to true set {top_half_of_circle} to false else if {bottom_half_of_circle} is true: remove 0.5 from {x} if {x} is less than ({radius} * -1): add 0.5 to {x} set {top_half_of_circle} to true set {bottom_half_of_circle} to false wait 1 tick
with teleport look smooth now, But it goes slow and then fast, constantly :/
Why the global vars? just use the circle function from my sexy shapes scriptthis what i came up with based on y = +/- sqrt(r^2 - x^2)
its not terrible but the armor stands dont get deleted fast enough so you can sometimes see a few at a time.
hopefully someone can find a way to improve this or make it simpler
code_language.skript:command /orbit: trigger: set {x} to 0 set {radius} to 10 set {top_half_of_circle} to true set {orbiting} to true while {orbiting} is true: set {circle_center} to player's location delete last spawned armor stand set {z} to sqrt(({radius}^2)-{x}^2) if {bottom_half_of_circle} is true: set {z} to {z} * -1 set {loc} to location at ({circle_center}'s x-coord + {x}), ({circle_center}'s y-coord + 1), ({circle_center}'s z-coord + {z}) set block at {loc} to armor stand spawn an armor stand at {loc} add "{NoGravity:1}" to nbt of last spawned armor stand if {top_half_of_circle} is true: add 0.5 to {x} if {x} is greater than {radius}: remove 0.5 from {x} set {bottom_half_of_circle} to true set {top_half_of_circle} to false else if {bottom_half_of_circle} is true: remove 0.5 from {x} if {x} is less than ({radius} * -1): add 0.5 to {x} set {top_half_of_circle} to true set {bottom_half_of_circle} to false wait 1 tick
it was an example so i didnt bother reaching all the way up on my keyboard to hit the underscore button.Why the global vars? just use the circle function from my sexy shapes script
command /circle:
permission: o.o
trigger:
spawn an armor stand at player's location
set {_a} to spawned armor stand
set gravity of {_a} to false
set {circle} to true
set {_l} to player's location
set {_radius} to 1
set {_angle} to 20
set {_rotation} to 180
set {_current} to 0
while {circle} is true:
add {_angle} to {_current}
set {_l} to {_location}
add ((cos ({_rotation} / 180) * 3.14159265358979323846) * ((cos (({_current} / 180) * 3.14159265358979323846)) * {_radius})) to x-loc of {_l}
add (sin ({_rotation} / 180) * 3.14159265358979323846) * ((cos (({_current} / 180) * 3.14159265358979323846)) * {_radius}) to y-loc of {_l}
add (sin (({_current} / 180) * 3.14159265358979323846)) * {_radius} to z-loc of {_l}
teleport {_a} to {_l}
wait 1 tick
Hey that sounds familiar heheread better? he want like "Orbit" and not In same position and spinning
Is this reply for me? If so, you can mention me via @glowgrewread better? he want like "Orbit" and not In same position and spinning