In 0.64.1 server, you can now add 'building proximity events' where you specify a building num and a distance, and an event will be triggered if the player enters or leaves the region of the building.
You activate that on a case by case basis as shown..
Code: Select all
Function SetupProx()
{
sysActivateBuildingProximityEvent( 22, 20 )
sysActivateBuildingProximityEvent( 119, 15 )
*msg %PLAYER% Building proximity events activated
}
Theres also DeactivateBuildingProximityEvent( [BuildingNum] ).
There are 4 new events.. BuildingIDProxEnter and BuildingIDProxLeave allow you to trigger events for a specific building. Alternatively, you can use the more general BuildingProxEnter and BuildingProxLeave events that are triggered for any prox event that isnt covered by a specific BuildingID event.
Here's an example of the generic events:
Code: Select all
Event( "BuildingProxEnter", "" )
{
*msg %PLAYER% You entered the region of buildingID $gBuildingNum
}
Event( "BuildingProxLeave", "" )
{
*msg %PLAYER% You left the region of buildingID $gBuildingNum
}
Code: Select all
Event( "BuildingIDProxEnter", "22" )
{
*msg %PLAYER% You entered the region of the central bank
}