SparkzZ Posted August 30, 2016 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
Simple0x47 Posted August 30, 2016 Posted August 30, 2016 There's no one like that, I think. Just take coordinates and use getDistanceBetweenPoints3d "Keep making it simplex."
SparkzZ Posted August 30, 2016 Author 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.
Tails Posted August 31, 2016 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. Discord: its.tails
Simple0x47 Posted August 31, 2016 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 "Keep making it simplex."
!#NssoR_) Posted August 31, 2016 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.
Simple0x47 Posted August 31, 2016 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. "Keep making it simplex."
!#NssoR_) Posted August 31, 2016 Posted August 31, 2016 sorry i didn't noticed that . i thought he wants know if the player near the water.
Simple0x47 Posted August 31, 2016 Posted August 31, 2016 No problem, all happy "Keep making it simplex."
SparkzZ Posted August 31, 2016 Author 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.
SparkzZ Posted August 31, 2016 Author 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.
Simple0x47 Posted August 31, 2016 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? "Keep making it simplex."
Walid Posted August 31, 2016 Posted August 31, 2016 testLineAgainstWater () Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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