#Land mine that looks at its targets

1 messages · Page 1 of 1 (latest)

tall nebula
#

I'm trying to make a land mine(banana peel) and it works as intended. The only problem is it looks at its targets. Thats not right, its not supposed to move at all! Does anyone know how to fix this?

azure grove
#

you can use query.body_y_rotation in an animation and just set the rotation of y to -query.body_y_rotation. if you want to randomise the rotation before hand, initialise a random variable between 0-360 then you could do someth9ing like -query.body_y_rotation+variable and it'll have a random rotation that doesnt continue to rotate

dry topaz
#

remove the look at target animation or animation controller or both from the entity rp file

tall nebula
azure grove
#

in the animation "base": { "rotation": [0, "-query.body_y_rotation + variable.rotation", 0] }

#

in the entity file ```"scripts": {
"initialize": [
"variable.rotation = Math.random(0, 359);"
],

tall nebula
#

@azure grove Did you mean something like this?

azure grove
#

yes but you can put it in a 0 length loop without a timeline, but yes

tall nebula
#

@azure grove I did that and it still didn't worked, is there something that should be changed in the resource pack by any chance?

azure grove
#

i already showed you, you need this "scripts": { "initialize": [ "variable.rotation = Math.random(0, 359);" ],

#

but actually, it looks like you're using the old format

#

but that wont help if your model is still spinning

#

what part exactly isnt working at the moment, is it still looking around?

#

and are you certain that animation is playing properly

tall nebula
#

@azure grove The animation hasn't been helping at all. Whats happening is that the banana peel looks at the target. I use nearest_attackable_target to make the peel hurt you when it's touched. However I realize that the same component is the main reason why the banana peel looks at you. Unfortunately, I can't figure out a way around this. All I want is the banana peel to stay put and not move at all.

azure grove
#

the instructions that i gave you fixes that exact problem. i have done it many times in many projects before. here's my exact animation

        "loop": true,
            "bones": {
                "fire": {
                    "scale": [0.5, 0.5, 0.5]
                },
                "base": {
                    "rotation": [0, "-query.body_y_rotation + variable.rotation", 0]
                }
            }
        }```
#

anbd my exact entity file

            "scripts": {
                "initialize": [
                    "variable.rotation = Math.random(0, 359);"
                ],
                "animate": [
                    "fire_controller",
                    "scalecorrect"
                ]
            },
            "animations": {
                "fire_flap": "animation.jig.pabc_fire",
                "is_fizzling": "animation.jig.pabc_fire_shrink",
                "scalecorrect": "animation.jig.pabc_fire_scalecorrect",
                "fire_controller": "controller.animation.fire"
            }```
#

the mob uses nearest target, but doesnt rotate

#

im using format "1.10.0" for entity version though i dont think that makes a difference. you're doing something wrong

#

check that the animation you made is actually playing, and make sure you are targeting the correct bone

#

since its a banana peel, make sure the model itself isnt in the head, and put it in the body

#

here's my exact geo too { "format_version": "1.12.0", "minecraft:geometry": [ { "description": { "identifier": "geometry.jig.pabc_fire", "texture_width": 128, "texture_height": 128, "visible_bounds_width": 3, "visible_bounds_height": 2, "visible_bounds_offset": [0, 1, 0] }, "bones": [ { "name": "base", "pivot": [0, 0, 0], "cubes": [ {"origin": [-4, 0.1, 0], "size": [10, 0.1, 12], "uv": [70, 33]} ] }, { "name": "tape", "parent": "base", "pivot": [-1, -0.75, 0], "cubes": [ {"origin": [-9, 0.2, 3], "size": [19, 0.1, 6], "uv": [0, 0]} ] }, { "name": "fire", "parent": "base", "pivot": [0, 0, 0], "cubes": [ {"origin": [-11, 0.1, 0], "size": [22, 26, 0], "uv": [0, 7]} ] } ] } ] }

#

if that doesn't work for you i've helped as much as i can

tall nebula
#

@azure grove It worked!! Thank you so much! I've been at this problem for 3 days now!!

tall nebula
#

@azure grove So great news. The banana moves again and I have no idea why. I needed to separate my project because it was too big, so I moved the banana peel code to a new project and simply copied and pasted everything, yet for some reason it looks around again! I've been looking at your code to match mine and even have been looking at the old banana code yet they completely match. Idk if an update affected it or me making a new project did, but once again it's driving me crazy! How hard is it to make a banana peel that doesn't move!?