#crouches down

1 messages · Page 1 of 1 (latest)

ruby meteor
#

is there a way to do it, when an entity arrives in a hole between blocks, it automatically crouches down?

ashen fractal
#

You could probably use some molang to test for that and to change the hitbox of the entity. u could also make a crouching animation for the mob that can also be activated by molang

#

that's basically my rough draft of the idea, anything further than that I would have no idea how to do unless i research it a bit more

ashen fractal
ruby meteor
#

i will try this

ashen fractal
#

alright let me know how that goes

rotund surge
#

Could always test if there is an airblock above the entity

#

And below to

ashen fractal
#

oh yeah that could also work too

ruby meteor
rotund surge
#

Using an execute would be best

#

Execute if block ~~~ air run whatever

#

Believe it's like that

#

Probs use to tags for both bottom and top and once both are added activate the sneaking

#

And also make sure the tags get removed when no air block is detected

ruby meteor
#

is that the mob will have two types of these sensors, one of 2 blocks, and one of vent (which is 1 block)

ashen fractal
#

does it detect the slab tho?

rotund surge
#

That's true

#

So you'd need to run detection for that to

ashen fractal
#

u could detect if it is a half block above or below instead

rotund surge
#

Wouldn't allow for crawling between 2 blocks though

ashen fractal
#

true

rotund surge
#

Just add some more checks

ruby meteor
#

I put this command in the BP animation?

ashen fractal
rotund surge
#

It needs to repeat so a animation controller

rotund surge
#

Needs to be checking if it's NOT an air block

ruby meteor
#

It seems difficult, can you send me an example?

rotund surge
#

Can't rn

ruby meteor
#

😦

rotund surge
#

You could try detecting suffocation damage

#

Idk how well that would work though

#

Execute unless block ~~~ air run whatevee

#

I think

ashen fractal
#

if u test for air u could do it where it kind of works like a redstone torch

#

so if it's true it doesnt execute

#

if false it does

#

im a little new to this stuff so i may not be that much help but it's some type of idea i came up with

halcyon spindle
#

I found the command thing for when u need ur entity to be the correct hitbox and instead detect for spaces infront of them like 1x2 space and 1x1 space, which fire events in the entity to change their hitbox and be able to crawl while playing the animation
@ashen fractal @rotund surge @ruby meteor

#

execute as @s positioned as @s rotated ~ 0 unless block ^^2^1 air unless block ^^-1^1 air if block ^^1^1 air if block ^^^1 air run @s itd:crawl1x2 execute as @s positioned as @s rotated ~ 0 unless block ~~2~ air unless block ~~-1~ air if block ~~~ air if block ~~1~ air run @s itd:crawl1x2 execute as @s positioned as @s rotated ~ 0 unless block ^^1^1 air unless block ^^-1^1 air if block ^^^1 air run @s itd:crawl1x1 execute as @s positioned as @s rotated ~ 0 unless block ~~1~ air unless block ~~-1~ air if block ~~~ air run @s itd:crawl1x1 execute as @s positioned as @s rotated ~ 0 if block ^^2^1 air unless block ^^1^1 air unless block ^^^1 air run @s itd:nocrawl execute as @s positioned as @s rotated ~ 0 if block ~~2~ air run @s itd:nocrawl execute as @s positioned as @s rotated ~ 0 if block ^^1^1 air if block ^^2^1 air unless block ^^^1 air run @s itd:nocrawl execute as @s positioned as @s rotated ~ 0 if block ~~1~ air unless block ~~~ air @s itd:nocrawl

#

although this actually works, I don't know how to really implement it so that the entity uses the command forever like always repeatedly