|Topic was automatically imported from the old Question2Answer platform.
I have this code here:
for c in self.get_children():
if self.get_children().size() > 0:
c.connect("body_entered", self, "nextDialogue")
what I would like to know, is that if and how could I take the body_entered signal, and get the node of that area2d that was entered. I don’t really need to know the body that entered it, just the area2d.
Bonus points: Is there a better way to trigger an event? each of my area2Ds have a string on them that lets me assign which event to start when the player enters that area. I’d love any feedback and/or a better idea!
I suppose something else if its possible, is if I can modify the existing body_entered signal so that I can also pass itself through code. I’d really like to be able to not spend a lot of time connecting code, or doing something complicated.
Illyas_Onii | 2021-05-07 23:06