Is it possible to create a command that can pull all the players in the radius? I've already done up to the getting player in the radius part. I'm just wondering how I shall be pulling players. Can someone help me with that? I tried doing vector multiplication by -1 and subtracting the target location but it didn't go as expected.
How about this logic. Check whether the other player keeps the distance to the radius ratio. If the distance is observed with the number of the radius, then we attract to the player
Get the vector that points to the center of the circle, apply that vector. dir = v1.sub(center).normalize().mult(-1) player.applyForce(dir)
Yes, that is how you would filter out players to get ones inside the circle. My answer was more aimed towards actual action to attract players to the center. PHP: affectedRadius = 20;center = new Vector3(x, y, z);subjects = array_filter(level.getPlayers(), fn(Player p): bool => p.distance(center) <= affectedRadius)for(subject in subjects) { dir = v1.sub(center).normalize().mult(-1) player.applyForce(dir)} There is nothing to copy and paste, to avoid spoon-feeding and encourage learning.