I have looked at the player (Area2D) node and everything seems good. I have the start code in there from the tutorial:
func _start(pos):
position = pos
show()
$CollisionShape2D.disabled = false
I don’t know what else I might be missing.
Also, the engine keeps telling me that (delta) is never used without an underscore in front of it, but the tutorial didn’t mention that. Is there something there that I’m doing wrong?
Yes, I am a clueless noob. Thank you for any help.
The underscore is used in functions to mark them as private (not used outside the class). There are no real private functions in gdscript, it’s more a rule. As you call it from another class (script) you use it public, so the underscore is not correct in the name of the function. Remove the underscore in the name of the function or add it to your function call.
But for parameter like “delta” you get a warning, that it’s declared but never used in code. To ignore this warning you can add the _ to the parameter name. It tells Godot “yes I know that it’s not used, will need it later”.
I set the Player node position to 240,450 when I was trying to figure out what was wrong and that caused the warning because you can’t transform a linked node.
What’s weird is I can get the game to start when I am in the project menu and go directly to run. The player won’t move around the board. But the game is open and the main sprite is there. I have never been able to get the mob to spawn, but I’ve gotten the main player sprite to work as it should with movement and sprite flipping while moving.
I got it to work. I must have put some code in the wrong node or something. I’m still not sure, exactly. I started over and got it all finished and working, though.