Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to create a "Flyer" ability #103

Open
Sarcose opened this issue Dec 29, 2024 · 0 comments
Open

Attempting to create a "Flyer" ability #103

Sarcose opened this issue Dec 29, 2024 · 0 comments

Comments

@Sarcose
Copy link

Sarcose commented Dec 29, 2024

As stated. The goal is for the mob to be able to fly toward its target, particularly in situations where the server has flight mods. However, I can't figure out how the coordinates of {target} and {self} are exposed.

For instance, this is one of my attempts. I've tried several permutations of this to no avail. The following doesn't resolve.
"command": "execute as {self} at {self} run data merge entity {self} {NoGravity:1b,Motion:[({target}.x-{self}.x)*0.1,({target}.x-{self}.x)*0.1,({target}.z-{self}.z)*0.1]}"

As a test, I can simply make the mob rise into the air. Obviously yeeting itself toward the flying player is the goal.
"command": "execute as {self} at {self} run data merge entity {self} {NoGravity:1b,Motion:[0.0,0.5,0.0]}"
The above works, I just can't figure out how to make it work dynamically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant