#how to make an entity have random animation in 1 state
1 messages · Page 1 of 1 (latest)
Properties? Maybe
you could use math.random(0, 1), or according to the number of your animations
Like i have 5 animation i must set condition to (0,5)?
(0,4)
then you can use query.has_property() == 0
Where to put that
Hmm can you give me an example or smth
Your animation only plays once, right?
Oh actually, I think I get what you want
You have a specific entity dead right?
Yes
To simulate a body or anything
Idk about properties
This is in the entity BP:
"property:dead": {
"type": "int",
"range": [0, 4],
"default": math.random(0, 4)
}
And in rp, it would be something like this:
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "example:yourentity",
"materials": { "default": "entity_alphatest" },
"textures": {
"default": "textures/entity/example"
},
"geometry": {
"default": "geometry.example"
},
"animations": {
"dead": "animation.dead1",
"dead2": "animation.dead2",
"dead3": "animation.dead3",
"dead4": "animation.dead4",
"dead5": "animation.dead5"
},
"animation_controllers": {
{ "dead": "query.property('property:dead') == 0" },
{ "dead2": "query.property('property:dead') == 1" },
{ "dead3": "query.property('property:dead') == 2" },
{ "dead4": "query.property('property:dead') == 3" },
{ "dead5": "query.property('property:dead') == 4" }
],
"render_controllers": [ "controller.render.example" ]
}
}
}```
@errant sandal