Jump to content

Checking if coordinates are near water


SparkzZ

Recommended Posts

Posted

That wouldn't work as there are many water sources and their area could be huge and distance between points won't be as accurate as I want it to be..

also I know there isn't a function that achieves that easily, am asking for a method or and idea that may accomplish what I need,

actually I myself had idea of test lines against water from all directions but figured that won't work too because there may be obstacles in the ways of the lines.

Posted

Colshapes are elements right? Put a colsphere on the player and use IsElementInWater to check whether the colsphere is hitting water.

Posted
Colshapes are elements right? Put a colsphere on the player and use IsElementInWater to check whether the colsphere is hitting water.

Why attaching them to the player? Why not create them on water zones ? :v

Posted

Why attaching them to the player? Why not create them on water zones ? :v

How you can create colshape for each water zones?

I think it's a bad idea.

The best way like what Tails said.

Posted
I want to know if a specific coordinate is near water

The player doesn't fit on SparkZ requirements,

he clearly said that he needs to know if a coordinate is near water,

not if a player is near water.

Posted
Colshapes are elements right? Put a colsphere on the player and use IsElementInWater to check whether the colsphere is hitting water.

Wouldn't work, isElementInWater doesn't work with colshapes.

As far as I tried it only works with players and peds.

Posted

I guess I resolved it, I took the coordinate and tested it against water from all directions and to ensure there is no obstacles I added 500 to the z value.

I am still testing it to make sure that it is 100% accurate, but as far it seems working well.

Posted
I guess I resolved it, I took the coordinate and tested it against water from all directions and to ensure there is no obstacles I added 500 to the z value.

I am still testing it to make sure that it is 100% accurate, but as far it seems working well.

Which method have you used?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...