Pin-pointing a location -
Scenario - 18.04.2012
Could I use the MapAndreas plugin to determine the closest point of land? For example, say a vehicle goes into the water and instead of re-spawning it, I can determine the closest area of land in relation to the vehicle.
If this is possible, HOW?
Re: Pin-pointing a location -
2KY - 18.04.2012
You could do some testing, but.. I think your vehicle would be below the Z coordinate 0.0 (sea level), so.. Just detect if they're not moving for a period of time (a couple second timer would be sufficient I suppose) and below sea level. I'm sure you COULD run into bugs doing this, but that's the only solution that comes to mind.
Re: Pin-pointing a location -
Scenario - 18.04.2012
Quote:
Originally Posted by 2KY
You could do some testing, but.. I think your vehicle would be below the Z coordinate 0.0 (sea level), so.. Just detect if they're not moving for a period of time (a couple second timer would be sufficient I suppose) and below sea level. I'm sure you COULD run into bugs doing this, but that's the only solution that comes to mind.
|
That is true, but it still doesn't do what I need it to. I basically want to determine if the vehicle is in water (which this might work fine with), and if it is, I then need to determine the closest piece of land and set the vehicle to be on land.
Re: Pin-pointing a location -
Shetch - 18.04.2012
I think it is impossible.
Maybe you could save a lot of positions around places near water, then if the vehicles is in water you would check if the player is in range of a point and set the vehicle's location to that point.
Re: Pin-pointing a location -
2KY - 18.04.2012
Quote:
Originally Posted by RealCop228
That is true, but it still doesn't do what I need it to. I basically want to determine if the vehicle is in water (which this might work fine with), and if it is, I then need to determine the closest piece of land and set the vehicle to be on land.
|
Right.. Hmm, you could set a timer for a couple seconds and store their position, then set their position back to it if they are found to be in water (using the steps I mentioned in my post)
Just brainstorming here.
Re: Pin-pointing a location - Moh_ - 18.04.2012
well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.
eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
Re: Pin-pointing a location -
Scenario - 18.04.2012
Quote:
Originally Posted by Moh_
well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.
eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
|
Are you sure? That just makes me think it's going to set it below sea level even more...?
Re: Pin-pointing a location - Moh_ - 18.04.2012
yes.
in my stunt server i have speed boost
when i fall in water and i go a bit below the sea level i get respawned in land near the sea.
(edit: i dunno if it will work with empty cars)
when u fall in a gta sa map bug u respawn in the map near the place you felt.
Re: Pin-pointing a location -
Shetch - 18.04.2012
Quote:
Originally Posted by Moh_
well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.
eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
|
Clever.
Never thought about that.