osd_daedalus
Knight
Re: [CODER NEEDED] Missing Necromancy Potions
really nice idea, although, checking scripts, the only part I have found related to a Point3D and HomeRange is: (spawner.cs)
and to me looks like much a square than a circle...
psz;680666 said:Why not use the spawner's Homerange?
It's a circle, it's settable in script or [props...
really nice idea, although, checking scripts, the only part I have found related to a Point3D and HomeRange is: (spawner.cs)
Code:
public Point3D GetSpawnPosition()
{
Map map = Map;
if ( map == null )
return Location;
// Try 10 times to find a Spawnable location.
for ( int i = 0; i < 10; i++ )
{
int x = Location.X + (Utility.Random( (m_HomeRange * 2) + 1 ) - m_HomeRange);
int y = Location.Y + (Utility.Random( (m_HomeRange * 2) + 1 ) - m_HomeRange);
int z = Map.GetAverageZ( x, y );
if ( Map.CanSpawnMobile( new Point2D( x, y ), this.Z ) )
return new Point3D( x, y, this.Z );
else if ( Map.CanSpawnMobile( new Point2D( x, y ), z ) )
return new Point3D( x, y, z );
}
return this.Location;
}