#Help on entity making

1 messages · Page 1 of 1 (latest)

crimson sand
#

Making a basic ghost entity, entity is invisible for some reason I cannot understand.

#

Im getting these errors in the content log, no other error is shown:

[Molang][error]-kai:ghost | MolangScriptArg::get<>() called on incompatible type 

[Rendering][error]-kai:ghost | Render Controller: controller.render.ghost is missing its default texture
#

This is my render controller:

{
  "format_version": "1.8.0",
  "render_controllers": {
    "controller.render.ghost": {
      "arrays": {
        "textures": {
          "Array.textures": [ "Texture.default" ]
        }
      },
      "geometry": "Geometry.default",
      "materials": [ { "*": "Material.default" } ],
      "textures": [ "Array.textures" ]
    }
  }
}
upper tartan
#
  "format_version": "1.8.0",
  "render_controllers": {
    "controller.render.ghost": {
      "textures": [ "texture.default" ],
      "geometry": "Geometry.default",
      "materials": [ { "*": "Material.default" } ]
    }
  }
}```try replace it with this
crimson sand
#

That worked, thank you!

#

I'll keep this post open because im sure i'll have more questions related to this same entity

crimson sand
#

How to trigger an attack animation when my mob attacks?

#

My animation controller:

{
    "format_version" : "1.10.0",
    "animation_controllers" : {
        "controller.animation.ghost.move" : {
            "initial_state" : "default",
            "states" : {
                "default" : {
                    "animations" : [ "move" ]
                }
            }
        },
        "controller.animation.ghost.attack" : {
            "initial_state" : "default",
            "states" : {
                "default" : {
                    "animations" : [ "attack" ]
                }
            }
        }
    }
}
upper tartan
#

what's your attack type melee or delay?

crimson sand
#

melee

#

Also somehow my idle animation is... "reseting" even though it has loop

upper tartan
#

then use v.attack_time > 0

crimson sand
#

Where?

upper tartan
#
            "initial_state": "default",
            "states": {
                "default": {
                    "variables": {
                        "move_speed": {
                            "input": "query.modified_move_speed",
                            "remap_curve": {
                                "0.0": 0,
                                "0.1": 1
                            }
                        },
                        "is_idling": {
                            "input": "query.modified_move_speed",
                            "remap_curve": {
                                "0.0": 1,
                                "0.1": 0
                            }
                        }
                    },
                    "animations": [
                        {"entity_move_anim": "variable.move_speed"},
                        {"entity_idle_anim": "variable.is_idling"}
                    ],
                    "transitions": [
                        {"attack_anim": "v.attack_time > 0"}
                    ],
                    "blend_transition": 0.2
                },
                "attack_anim": {
                    "animations": ["attack_anim"],
                    "transitions": [
                        {"default": "q.all_animations_finished"}
                    ],
                    "blend_transition": 0.2
                }
            }
        },```
crimson sand
#

Can you please explain me this?

upper tartan
#

which one?

upper tartan
#

well, I don't really know how the remap curve work so you can read this it's all just trial and error on my part so you can read this https://bedrock.dev/docs/stable/Animations#Transforms
for the way how the animation work here well the transition is for switching to another animation using molang, the blend_transitions is to smooth out the way the animation goes from one to another "animations" is the name of the animation you want

Minecraft Bedrock Animations Documentation

crimson sand
#

Okay, thank you

#

I really doubt the issue is the animation, because it does not has this issue in bb

upper tartan
#

what keyframe did you use for the idle?

crimson sand
#

Where can I see that? The keyframe page is empty

#

If you mean the animation length, it is 4.125

upper tartan
crimson sand
#

There is no way I can get that to be shown 😅

#

Not sure if this is it:

#

Im selecting the body bone by the way, which includes all the bones

#

Yeah that should be it

upper tartan
#

can I see the whole timeline of the keyframe?

crimson sand
upper tartan
#

make sure all the last keyframe is at the end of the loop

crimson sand
#

How exactly I can make sure of that? Sorry, animation is not much of my topic

upper tartan
#

like this

crimson sand
#

So this should be good?

#

Unrelated issue. When I attack my entity it starts flying like a balloon, plus sometimes it randomly falls?
Im using the vanilla behavior file of the vex.

crimson sand
#

Hey! @upper tartan Thank you very much, the keyframes were the issue. 🙂
I was wondering, do you know how I could make my entity attack animation be played a bit earlier than the attack itself?

upper tartan
#

well that would be delayed attack

crimson sand
#

Oh I see, how does that work?

#

In a related question... I want my ghost to have these animations:

  • idle (when idling)
  • float (when moving)

How can I define the difference?

upper tartan
#

just use the animation control I gave you above

crimson sand
#

I did, though, animation is not playing, just idle

#
"animations": [
                        {"float": "variable.move_speed"},
                        {"idle": "variable.is_idling"}
                    ]
#

Oh, my mistake. Had something spell wrong on the entity file. That part works perfectly

crimson sand
#

Bump on this. Im still in the need to know how to make delayed attacks

wise valley
crimson sand
#

I haven't! That sounds like exactly what I need, thank you! Will try and update the post