How do you approach having 2 player node in 2 different map node or scene ?

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

I am trying to make a basic 2 players project which would have a main map(overworld) and sub maps ( caves/dungeons etc… ) I have set area2d to trigger the change of node but, both player nodes get transfered to the new node.

How would you approach this. Anyone know of an online video, written tutorial or, github project that I could have a look at to solve this ?

Thank you

Are you using “couch multiplayer”? (Two players on the same PC)

Tato64 | 2021-04-22 00:22

Nope, 2 different clients either on different computer (with a friend oversea) or 2 godot instance on the same computer

Mobidoy | 2021-04-22 00:50

:bust_in_silhouette: Reply From: Mrpaolosarino

in the area 2d trigger of yours, if you do a get_overlapping_bodies etc. It will return an array. and if you do a array.front() in it, it will return the nearest player.