Hello everyone,
I have some problems while figuring out how I can set the direction an armor stand is looking.
I need this for a chairs script. It makes a player ride an invisible armor stand when rightclicking a stair. But due to the direction of the armor stand, the legs do not always look as they should. (Screenshots are attached, screenshot1 is where the direction of the armor stand is not as I want it to be, screenshot2 shows a naturally correct armor stand because its default direction when spawned matches the direction of the stairs)
Here is my code:
Hope someone can help me with this.
I have some problems while figuring out how I can set the direction an armor stand is looking.
I need this for a chairs script. It makes a player ride an invisible armor stand when rightclicking a stair. But due to the direction of the armor stand, the legs do not always look as they should. (Screenshots are attached, screenshot1 is where the direction of the armor stand is not as I want it to be, screenshot2 shows a naturally correct armor stand because its default direction when spawned matches the direction of the stairs)
Here is my code:
Code:
on rightclick on stairs:
if {sitting.%player%} is not set:
set {sitting.%player%} to true
spawn armor stand at location 1.8 below and 0.1 in front of clicked block
set {_seat} to last spawned armor stand
add "{Invisible:1}" to nbt of {_seat}
add "{NoGravity:1}" to nbt of {_seat}
set {seat.back.%player%} to player's location
make player ride {_seat}
while player's vehicle is {_seat}:
set yaw of player's vehicle to player's yaw
wait 3 ticks
Hope someone can help me with this.