#(Hedwy) Rotate armor stand body part to player after click

59 messages · Page 1 of 1 (latest)

spiral lava
#

Hello! This is probably gonna be a hard question...
I want to make an armor stand editor, so players just need to choose a part of the armor stand that they want to edit and RMB with a special tool on it, then arm/head/etc must be rotated to look exactly on player position.
I already know that I need to use armor_pose, but im not sure how can I get exactly fitting tags to make parts rotate to player's face:
- adjust <context.entity> armor_pose:[head=<tagx>>,<tagy?>,<tagz?>]

Examples:
with head, when I click RMB with a special tool, head faces to me. With arms - when I click RMB, hand is trying to "reach" me.

nimble knotBOT
#

(Hedwy) Rotate armor stand body part to player after click

#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

spiral lava
#

As I understand I will need to use different tags for every part of armor stand, I kinda tried to use <player.location>, <player.eye_location> and some more but this rotations was... weird.

frigid wadi
#

hmm

#

ok nvm, was going to say something, realized it doesnt work

novel bronze
#

i actually wouldn't recommend locationtags for those inputs

spiral lava
frigid wadi
#

damn thats quite impressive

novel bronze
#

oh wow that video is uh

#

far beyond what i would have thought of

frigid wadi
#

wow its a datapack

novel bronze
#

i was going to suggest that if you want players to adjust them, you want either some kind of tool system or a gui

frigid wadi
#

maybe you can look into the source code or something

spiral lava
#

Not a GUI, when player damages armor stand, he is choosing what to edit. Then with RMB he is changing position of choosed part

#

This is how I planned to do

novel bronze
#

its moving incredibly fast to figure out how it's actually determining what specifically to adjust

#

like, there aren't "hitboxes for an armor_stand's arm" or "hitboxes for the armor_stand's baseplate"

#

that's impressive as hell

spiral lava
#

As I understand in video author catches right clicks with an invisible villager inside a player, but how did he doin a calculations... I dont understand at all

frigid wadi
#

(and its a datapack as well, not even a plugin or a script)

novel bronze
#

it has to be coordinating yaw/pitch and calculating where it's looking at, in relation to the armor_stand's location

frigid wadi
#

maybe, get the player's eye location, bring it like 2 blocks forward, and get the closest armor stand part to that

trim otter
frigid wadi
#

isn't precise cursor on deprecated or something

#

!t precise_cursor_on

fast marlinBOT
# frigid wadi !t precise_cursor_on
Cannot Specify Searched Tag

Multiple possible tags: <LocationTag.precise_cursor_on[(<range>)]>, <LocationTag.precise_cursor_on_block[(<range>)]>.

trim otter
spiral lava
#

For example speaking about head position, it can be something like look command but only for a head. I dont quite think that this method will work for arms and legs but..

frigid wadi
#

ngl i think im going to try to recreate this when i got the time

#

very very very interesting

novel bronze
#

that video's usage is insanely intricate

spiral lava
#

Will be appreciated for any help in this question ^-^
Almost for a week trying different tags, but I feel that I do not really have that much skills to make something that exciting 👉 👈

novel bronze
#

i don't want to give you low expectations, but i was going to recommend a GUI that let you adjust the armor_stand's x/y/z manualy by buttons

#

if you want to replicate that video, you'd need to use what aya suggested:

#

!tag LocationTag.ray_trace

fast marlinBOT
# novel bronze !tag LocationTag.ray_trace

Traces a line from this location, in the direction its facing, towards whatever block it hits first, and returns the location of where it hit.
This tag has also been referred to as 'cursor_on' or 'precise_cursor_on' in the past.
Using 'return=normal' instead replaces the old 'precise_impact_normal' tag.
Optionally specify:
range: (defaults to 200) a maximum distance (in blocks) to trace before giving up.
return: (defaults to precise)
specify "precise" to return the exact location of the hit ...

Group

world

Returns

LocationTag

Examples
# Destroys whatever solid block the player is looking at.
- define target <player.eye_location.ray_trace[return=block]||null>
- if <[target]> != null:
    - modifyblock <[target]> air
# Spawns a heart wherever the player is looking, no more than 5 blocks away.
- playeffect effect:heart offset:0 at:<player.eye_location.ray_trace[range=5;entities=*;ignore=<player>;fluids=true;nonsolids=true;default=air]>

and more... Check the website for more examples

novel bronze
#

that'll return your entitytag for the armorstand

#

making it glow, if you want that:

#

!command glow

fast marlinBOT
# novel bronze !command glow
Group

player

Syntax

glow [<entity>|...] (<should glow>)

Short Description

Makes the linked player see the chosen entities as glowing.

Description

Makes the linked player see the chosen entities as glowing.
BE WARNED, THIS COMMAND IS HIGHLY EXPERIMENTAL AND MAY NOT WORK AS EXPECTED.
This command works by globally enabling the glow effect, then whitelisting who is allowed to see it.

THIS COMMAND IS UNSTABLE AND IS SUBJECT TO BEING REWRITTEN IN THE NEAR FUTURE.

novel bronze
#

glow has always been incredibly difficult to work with alongside other plugins

#

because of how it works internally

spiral lava
#

Glow isnt really needed, tbh once I tried to use it and... got a java error, lol.

#

Im a little scared to use it again

#

A weird problem cuz after using it none of players was able to join server until restart creeperblock_head

trim otter
#

You can probably just use the cast command to give the armor stand the glow effect?

trim otter
#

@spiral lava is this resolved? or are you still having issues (if so, then please explain exactly what do you already have / what are you currently struggling with)?

spiral lava
#

I think yep, I figured out some things.