A passable collision object able to trigger a event

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Repertix

I want to add checkpoints to my game, but I can’t find a collision object able to get through it to trigger an event. I’m using a KineticBody2D for this, I tried using Area2D with body_entered but didn’t work, and I tried to make StaticBody2D passable, but didn’t work. What’s the best way to do this?

Area2D should work. What’s your code like?

exuin | 2020-09-17 05:20

And what does mean “didn’t work”? No mindreaders around, be specific please.

Reloecc | 2020-09-17 07:00

I tried using the signal body_entered with Area2D using connect() and the console says that from expected 0 arguments, 5 arguments were added

Repertix | 2020-09-17 20:15

So you added 5 arguments? If you’re connecting from the Area2D node, it should look like this:
connect("body_entered", node_you_want_to_connect_to, "on_checkpoint_entered_or_something")

exuin | 2020-09-17 20:24

Yeah, when I put something like that, the console throws me an error saying 0 arguments expected but called with 1 or sometimes says that are 5 arguments

Repertix | 2020-09-18 00:35

What does your code look like, exactly?

exuin | 2020-09-18 02:29