SparkzZ Posted August 30, 2016 Share Posted August 30, 2016 I want to know if a specific coordinate is near water, I can't think of a method that can do that. Thanks in advance Link to comment
Simple0x47 Posted August 30, 2016 Share Posted August 30, 2016 There's no one like that, I think. Just take coordinates and use getDistanceBetweenPoints3d Link to comment
SparkzZ Posted August 30, 2016 Author Share Posted August 30, 2016 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. Link to comment
Tails Posted August 31, 2016 Share Posted August 31, 2016 Colshapes are elements right? Put a colsphere on the player and use IsElementInWater to check whether the colsphere is hitting water. Link to comment
Simple0x47 Posted August 31, 2016 Share Posted August 31, 2016 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 Link to comment
!#NssoR_) Posted August 31, 2016 Share Posted August 31, 2016 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. Link to comment
Simple0x47 Posted August 31, 2016 Share Posted August 31, 2016 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. Link to comment
!#NssoR_) Posted August 31, 2016 Share Posted August 31, 2016 sorry i didn't noticed that . i thought he wants know if the player near the water. Link to comment
SparkzZ Posted August 31, 2016 Author Share Posted August 31, 2016 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. Link to comment
SparkzZ Posted August 31, 2016 Author Share Posted August 31, 2016 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. Link to comment
Simple0x47 Posted August 31, 2016 Share Posted August 31, 2016 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? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now