Armor stand combine

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

MeHow

Active Member
Feb 6, 2017
140
13
18
22
Lithuania
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


upload_2021-8-8_3-38-59.png
 
Status
Not open for further replies.