Hello! I'm making a combat game and I'm stuck on 2 things.
**1. ** The player will have 2 different modes: Normal mode and Attack mode. When you press "E" you activate attack mode. How would I turn attack mode off when you press "E" again?
2. The game has 2 players and with attack mode, you're always facing the second player. How can I see a player's position from a different scene?
[For example: Access Player 2's position in Player 1's code]
Code:
AttackMode = true
if AttackMode == true:
if self.position.x <= 640:
$Image.set_flip_h(false)
$Area2D/CollisionShape2D.position.x = 30
if self.position.x >= 640:
$Image.set_flip_h(true)
$Area2D/CollisionShape2D.position.x = -26```
Thanks!