Comparing 2 sets of properties

I need help comparing 2 sets of property’s (Or 4 property’s) which are the coordinates of the player and coordinates of a ball device. I’m not the best at block coding and this is out of my knowledge.


I want to compare the ball x coordinate with the player’s x coordinate and same for the Y.
The values are set as numerical and saved in a property.


Bassicly what i want is that if the cordanites of the ball and the player are the same i want it to broadcast on a channel.

4 Likes

i feel you. I will try and find a guide though.
That sounds like a pain :confused:

This should help lol

2 Likes

I forgot, does Gimkit have IF statements
because if so just do if first property == second property then whatever

2 Likes

Wait
How did you get the ball coordinates?
If you elaborate, I can probably help.
Otherwise, it is impossible to track ball coordinates without a really non-memory-efficient zone grid

1 Like

Otherwise, the block code would look like this

set property | "abs 0 x" = [get property | player x] - [get property | ball x]

repeat this but swap x with y

then

if [get property " abs 0 x"] + [get property "abs 0 y"] = 0
then broadcast on your channell of choice

Well, i wasnt going to say but if you use a grid of ball zones you can detetct the location of a ball.


Thanks shaft, ill have to do this later due to a surprise exam.


You where offline, also I just want it to be a gimbrawl gamemode. Also I would never steal, definitely not from a friend.

3 Likes

check previous reply I edited it

alright if it works make sure to mark a solutiion (I’m on that solution grind XD)

1 Like

another way you can do this is

if  ball x = player x 
do: if ball y = player y
do: broadcast message on channel: respawn

(this is the way i did this)
@jhan you better not steal my guide/game :angry_face_with_horns:
you know i figured out how this works, you can just ask me…

1 Like

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