Mapping underwater
#1

I have some mapping that is partly above water and partly underwater. Is there any way I can set the object to only be seen above ground? So the part above water can be seen when you are not in the water and the part below water can only be seen when you are underwater?
Reply
#2

I could make a little script for you, but it will be pretty inefficient if there are many objects below the water level.
But this could be buggy, because we do only have one coordinate for an object, meaning it would fully disappear if the center is below 0.0 (Z) - but they could be made invisible, so its collision is still there.
Reply
#3

Quote:
Originally Posted by NaS
Посмотреть сообщение
I could make a little script for you, but it will be pretty inefficient if there are many objects below the water level.
But this could be buggy, because we do only have one coordinate for an object, meaning it would fully disappear if the center is below 0.0 (Z) - but they could be made invisible, so its collision is still there.
How would I do that?
Reply
#4

can i know the map editor are u using to make that map (mta map editor or other map editor)
Reply
#5

Quote:
Originally Posted by semara123
Посмотреть сообщение
can i know the map editor are u using to make that map (mta map editor or other map editor)
How is this relevant?

Anyways, I don't understand what you mean. Like do you want it to only stream when you're in water (and vice versa)? Or is it an object flag bug, like when object id 18754 and 18753 are underwater (they appear like they are above water and water is invisible).
Reply
#6

Quote:
Originally Posted by Crayder
Посмотреть сообщение
How is this relevant?

Anyways, I don't understand what you mean. Like do you want it to only stream when you're in water (and vice versa)? Or is it an object flag bug, like when object id 18754 and 18753 are underwater (they appear like they are above water and water is invisible).
It's an object flag bug. You can see the object as clear underwater as you can above water.
Reply
#7

Well, as long as the player is above the water (z > 0.0), the objects that should be invisible above water are made invisible (Using SetObjectMaterial). And when he gets below 0.0, they are set to the normal textures.

But as I said that is a lot of work for the cpu if there are many players and/or objects, since the objects must be visible per-player.

If this is what you mean. If you mean the bug, it could be worked-around with the above mentioned script, but would be ugly.
Reply
#8

Quote:
Originally Posted by NaS
Посмотреть сообщение
Well, as long as the player is above the water (z > 0.0), the objects that should be invisible above water are made invisible (Using SetObjectMaterial). And when he gets below 0.0, they are set to the normal textures.

But as I said that is a lot of work for the cpu if there are many players and/or objects, since the objects must be visible per-player.

If this is what you mean. If you mean the bug, it could be worked-around with the above mentioned script, but would be ugly.
That would not be a good way to work around it, especially if some of the objects are half way out - half way in.

I don't like this either, it's not really a bug though. They (Rockstar and SA-MP) just need to use the right flags when creating objects. They must've had a reason for this to be possible though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)