Is_processing() for var

I don’t know if it is worth while. Instead of creating a new var it seems like Godot has a is_processing() function.

I did

	if is_processing():
		if "Goal" in body.get_groups():
			complete_level(body.file_path)
		if "Hazard" in body.get_groups():
			crash_sequence()

Nice, thanks for that. I can see it saving some effort and debugging down the road. I went a slightly different route, but same results:

func _on_body_entered(body: Node) -> void:
	if not is_processing():
		return

	if body.is_in_group("Goal"):
		complete_level(body.file_path)
	
	if body.is_in_group("Hazard"):
		crash_sequence()
2 Likes

Privacy & Terms