Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Noob_Maker | |
Old Version | Published before Godot 3 was released. |
Yeah, It gives me that error but that paracentesis is already there. ‘-’
Here’s the line Godot is unhappy with: Right = Input.is_action_pressed ("right")
Yeah…
Edit: Here’s the longer version:
func _fixed_process(delta):
CollisionShape.set_extents(Vector2(get_size)
Right = Input.is_action_pressed ("right")
Left = Input.is_action_pressed ("left")
Jump = Input.is_action_pressed ("jump")
LSprint = Input.is_action_pressed("left_sprint")
RSprint = Input.is_action_pressed("right_sprint")
if Right == true:
set_linear_velocity(Vector2 (s, get_linear_velocity().y))
elif Left == true:
set_linear_velocity(Vector2(-s, get_linear_velocity().y))
else:
set_linear_velocity(Vector2 (0, get_linear_velocity().y))
if is_on_ground():
if Jump:
set_axis_velocity(Vector2(0,-jumpforce))
Can you show more code? maybe is a previous line and the editor “thinks” it was a line break.
eons | 2017-01-02 23:54