Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | G2700 |
extends Area2D
var in_area = true
func _on_Jumppad_body_entered(body: Node) → void:
$JumpadSound.play()
body_in_area()
func body_in_area():
while in_area == true:
if not Input.is_action_pressed(“ui_up”):
get_parent().get_node(“Player”).movement.y = -2000
print(get_parent().get_node(“Player”))
func _on_Jumppad_body_exited(body: Node) → void:
in_area = false
We can’t see the picture. It appears to be a broken link
godot_dev_ | 2023-05-23 15:53
Just post the script itself (as formatted code) into the forum. That’ll avoid any issues with linking of an image and make the code easier to read.
Also, you’re going to need to provide some more details. What does “not work” mean? Are you getting an error? If so, what’s the error? Does it just not do what you want? In that case, what is it doing and what should it be doing?
Without at least some of the above, it’s very difficult to provide you with useful input.
jgodfrey | 2023-05-23 16:08
It is hard to read the code. Please format it using this post as a guide to post formatting
godot_dev_ | 2023-05-23 19:21