'any value in array'

I am trying to figure out if the player shot someone else or missed. So I want to take the endpoint of the ray-cast hit positon and see if it matches any value in a array containing the postions of the whole enemy team. But I can’t find any way to do this, but I think I am just dumb so I am asking here.

I think Array contains might do what you want.

1 Like

It does not look like it. I am not searching for a specific value in a array, I am seeing if my value matches any of the values in the array.

I think they meant “check if the array of positions contains the end point of the ray-cast”

So “array contains (ray cast hit position(____) )= True:
Etc

(Also, wouldn’t it be easier to use a ray cast hit player instead, and check if the array “all players” contains them?)

(If you aimed just 0.1 metres above their position, still hitting them, it would count as a miss)

1 Like

Well I am not sure I am kinda new to workshop. I am trying to see like I said if the player missed or hit, and if they missed something happens and if they hit something different happens.

Do not bother with ray cast, use Player deals damage… 100% works and easier.
Like Pharah, you can see a target on shooting but there is no a hit because it is not Mccree or Soldier-76, different projectile speed.

It’s being used in a Widow HS only so that’s not very important, and using player dealt damage I can’t get a inverse of it, to make something happens when I fire and miss.

How do you want to deal with a miss? Do you count it or what? You can add counter on Primary fire and do something on dealt damage with it. Nothing can be more accuracy.