How do I check for player spawns

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I have a single screen map with game play similar to Super Smash Bros.

    When players die they need to respawn at one of the set spawn points. I need to check if a player is close or already spawned on that point and spawn the dead player in a different location.

    I have hidden sprites representing the spawn points.

    I've tried doing this two ways without success.

    1. Putting all the players into a family, then checking on respawn each respawn sprite for no line of sight to the players family.

    2. Using the turret behavior and checking for no target in range.

    neither of these worked, does anyone know a good way to implement this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use the distance function to check. If distance(Spawn.X, Spawn.Y, Player.X, Player.Y) <= MIN_ALLOWED_DISTANCE then spawn. Just experiment with MIN_ALLOWED_DISTANCE a little.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)