Hey guys, I have problem with armor stand merging and combining. I am trying to do vehicle moving. The main problem is with NBT tags rotation, then I am doing model rotation my armor stand goes from model insides.
Code:
on vehicle steering:
if player's vehicle is armor stand:
if player's vehicle has scoreboard tag "pos:driver":
set {_fuel} to metadata value "fuel" of {-cars::car::%{-cars::%player%::hash}%::1}
if {_fuel} is not set:
set {_fuel} to 0
if {_fuel} <= 0:
set {_fuel} to 0
send action bar "&4&lNepakankamai kuro!" to player
stop
if event-string is "W": #PROBLEMA SU ROTATION
push {-cars::car::%{-cars::%player%::hash}%::1} in the direction of player at speed 0.12
add "{Rotation:[%player's yaw%f,0f]}" to {-cars::car::%{-cars::%player%::hash}%::1}'s entity-nbt
set yaw of {-cars::car::%{-cars::%player%::hash}%::1} to yaw of player
set pitch of {-cars::car::%{-cars::%player%::hash}%::1} to pitch of player
loop {-cars::car::%{-cars::%player%::hash}%::*}:
if "%loop-index%" isn't "1":
push loop-value in the direction of player at speed 0.12
add "{Rotation:[%player's yaw%f,0f]}" to loop-value's entity-nbt
set yaw of loop-value to yaw of player
set pitch of loop-value to pitch of player
chance of 5%:
set metadata value "fuel" of {-cars::car::%{-cars::%player%::hash}%::1} to {_fuel}-1
else if event-string is "S":
loop {-cars::car::%{-cars::%player%::hash}%::*}:
push loop-value backwards at speed 0.05
add "{Rotation:[%player's yaw%f,0f]}" to loop-value's entity-nbt
#set {_c} to random integer between 2 and 4
#drawDot count {_c}, particle "smoke", center player, visibleRange 10
send action bar "&e&l%{-cars::speedometer::%player%}% &eb/s &f&l| &c%{_fuel}% &l%%" to player