Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Бен Брэмхолл |
I don’t know what I did wrong so I need help.
my code is:
if is_jumping
_velocity.y = jump_strength
_snap_vector = Vector3.ZERO
elif just_landed:
_snap_vector = Vector3.DOWN
_velocity = move_and_slide_with_snap(_velocity, _snap_vector, Vector3.UP, true)
if _velocity.length() > 0.2:
var look_direction = Vector2(_velocity.z, _velocity.x)
func _process(_delta: float) → void:
_spring_arm.translation = translation
What error are you getting?
Gluon | 2022-11-26 21:25
I figuered out how to solve this, but I have another issue where it says error parsing expression, misplaced: elif
Бен Брэмхолл | 2022-11-26 22:22
Oh well the new error should be easy to solve. The error itself should tell you which line it is referring too. Your elif must not be valid in an if block, maybe it isnt tabbed in correctly or something similar.
Gluon | 2022-11-26 22:38
Thank you it worked but now it says the same thing but for func
Бен Брэмхолл | 2022-11-27 01:01
nvm I fixed that as well
Бен Брэмхолл | 2022-11-27 03:53
Can you mark this question as answered?
Juxxec | 2022-11-27 11:44