Detection for Player positions

So im trying to make it so if a player is 10 blocks or closer to them it will warn they player

So player from team 2 is 10 or less blocks away transmit on a channel and im using block code cuz i know it will use and this is what i have that might speed up the prosses


This is within a trigger that when anyone moves (player scoped) it triggers and my goal is to check for it the player is on team 1 or team 2

Team 1: Check where the player is at all times
Team: 2 Check if they are within 10 or less blocks of player in team 1

what do you need help with?
there are many guides revolving around this topic, like this one:

whoops sorry…i was a bit tired while i was reading the whole thing, my bad

anyways, i think you can find guides that have the same topic, though since im not a coder, im not too sure if the guides will be helpful to find what you’re looking for

This.

3 Likes

if you need to find x and y then you can use player coords


you’ll want to use these settings right down here

and then you’ll be able to get player coords

and then for the transmit channel using blocks part idk either I’m actually trying to figure that out myself

Im trying to figure out if a player on one team is 10 blocks or less from another player on another team…

do you need help with getting the coords of two players?
i do have an idea for that
you could try this out


actually swap the numbers this is assuming that if your making a dbd type of game then that team 1 are survivors and team 2 are hunters (assuming that there can only be 1 hunter)

2 Likes

This might be memory intensive and I’m not sure if it works but couldn’t you add a tag zone that doesn’t respawn when tagged and sends a message on a channel?

2 Likes

i’ve never used tag zones before i’ll check that out
actually yeah that works


something like this?
when player is tagged it activates a trigger that sends a notification to the tagged player

1 Like

…

If someone sounds like they want distance, give them something related to distance

….
Tag zones… they have 3 tiles distance max

1 Like

bro what is that :sob:
like I was expecting a distance formula in there at some point but sheesh that’s a lot of text operations :agony:
there is a much more simple way to do this

materials: coord device, 4 props, and a trigger loop (may have forgotten a couple more devices but it’s in my shatterglass map)

annddddd I have to go. fudge taters

Im not looking to see where the player are im looking to see if if the hunter on team 2 is 10 or less on x or y from player on team 1

ill check it out

Finish this when you can

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.