Find the nearest Ground Z Position.
#7

I've created a few custom buildings in my gamemode and I've created an override of sorts as below:

pawn Код:
GetZFromXY ( Float: X , Float: Y , & Float: Z )
{
    MapAndreas_GetZ_From2DCoord ( X , Y , Z );

    if ( X > OverrideXMin && Y > OverrideYMin && X < OverrideXMax && Y < OverrideYMax )
    {
         Z = OverrideZ;
    }
}
Where Override values are the X and Y values for the area below the bridge and Z is the height below the bridge.

Very basically, this just gets the Z coord from Map Andreas but will force a different output if the X and Y coordinates fall within the "override" area (in this case, under the bridge).
Reply


Messages In This Thread
Find the nearest Ground Z Position. - by Varkoll_ - 29.08.2013, 09:18
Re: Find the nearest Ground Z Position. - by Dragonsaurus - 29.08.2013, 09:40
Re: Find the nearest Ground Z Position. - by Varkoll_ - 29.08.2013, 09:45
Re: Find the nearest Ground Z Position. - by Konstantinos - 29.08.2013, 10:39
Re: Find the nearest Ground Z Position. - by Varkoll_ - 29.08.2013, 12:15
Re: Find the nearest Ground Z Position. - by Varkoll_ - 29.08.2013, 15:50
Re: Find the nearest Ground Z Position. - by WrathOfGenesis - 29.08.2013, 16:41
Re: Find the nearest Ground Z Position. - by Pottus - 29.08.2013, 17:08
Re: Find the nearest Ground Z Position. - by Varkoll_ - 29.08.2013, 19:36
Re: Find the nearest Ground Z Position. - by Mauzen - 29.08.2013, 20:20

Forum Jump:


Users browsing this thread: 1 Guest(s)