so far, i've got a pretty basic skript going. however i'm not sure how to check if i'm touching the side of a block or not. as of now all i've got is looking 1 block infront of the player, which has two problems. a) it still activates if i'm near the block, not touching it, and b) it's looking from the eyes of the player rather than the feet. can anyone help?
#how would i create an auto-step feature like the draconic evolution mod?
1 messages · Page 1 of 1 (latest)
Cant you use a number lower than 1?
/attribute @p minecraft:generic.step_height base set 1
In 1.20.5 and higher theres a generic.step_height attribute that does what your trying to do
i'm not in those versions unfortunately, i'm stuck all the way back in 1.17.1 right now
that might work, but i still need to solve the problem as to what "infront of the player" entails
i was thinking of using the yaw of the player, but i don't know how to translate that into a direction
You could potentially use a vector for this
# Pitch 0 means to not check the up/down direction
set {_v} to vector from yaw player's yaw and pitch 0
# Makes the vector only check 0.1 blocks away
set vector length of {_v} to 0.1
# Checks for a block 0.1 meters in the player's facing
set {_b} to block at (player ~ {_v})
# Gets the block above the block infront of the player
set {_b2} to block at (player ~ {_v} ~ vector(0,1,0))
if {_b2} = air:
if {_b} != air:
# Teleport Logic```
something like this might work
i'll take a look at it. thanks a ton
it's a little finnicky but with some fine tuning i think this is going to work. again, thanks for your help!