Godot Version
4.3
Question
Hi, I am trying to create a 2 player local multiplayer game where one player controls using wasd and the other uses arrow keys. I am trying to have player movements for both players in one script and am having issues using separate data from each player.
How can I separate data from each player such as Player 1 coordinates vs Player 2 coordinates. I am using @export var player_index := 0, and setting a number to each 2d Player character to separate them but it doesn’t do anything in code. My end goal right now is to find the distance between both characters at all times, but cannot when the coordinates come together, unless I am overlooking something. I want to have player 1 and player 2 separate to call data from, but cannot seem to do this when using the same script.
help