- Edited
I'm working my way through the "Godot 3 Complete Developer Course - 2D and 3D" course on Udemy. At the end of the Space Attack section is the assignment to add a health bar for the player. Here is a link to download my full project. http://www.markalmighty.com/f/ez/downloader.php?d=godot&f=SpaceAttack_by_MarkAlmighty.zip
The game crashes when the player ship gets hit and I've included an argument with the emit_signal in Player.gd, Line 63:
func _on_Player_health_changed(new_health):
print(new_health) #<-- WORKS!!!
emit_signal("health_changed", new_health)
The debugger output: Debug Process Started OpenGL ES 3.0 Renderer: GeForce GTX 1060 6GB/PCIe/SSE2 465.249115 drivers/unix/netsocketposix.cpp:190 - Socket error: 10054 Debug Process Stopped
If I remove the "new_health" argument, there's no crash. (Of course, the LifeBar also doesn't get updated.)