hello
i've used godot for some time, but still am mostly a nooblet
having set up a lil tank, and getting it to shoot lazers, i proceeded to make them disappear upon hitting an obstacle. strangely enough, something goes wrong the moment body_enter signal is called.
i get this error (it doesn't crash the game thou):
error calling method from signal (body_enter), expected 0 arguments
it's really weird because the brackets in the "_hit()" function are empty (i assume this is where arguments usually reside?)
code, the object is an Area2D (sorry for raw paste, but i cant get the code frame thingy to work)
func ready():
connect("bodyenter",self,"_hit")
func process(delta):
v=Vector2(vbsin(r)delta,vbcos(r)delta)
setrot(r)
getnode('sprit').setglobalpos(self.getglobal_pos().floor())
func hit():
queuefree()
i used the body_enter signal many times in the past and this has never happened, so am quite confused. :<