Building Proximity Events - 0.64.1
Posted: Mon Feb 11, 2013 12:32 pm
I know Morb (for one) has been asking for this for ages, though i can't find a feature request thread for it.. anyway..
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..
First param to the 'Activate..' function is the building record number, the second is the distance. Each building can only have one active proximity event per online player.
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:
or alternatively you can do somethng like..
wahey.
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
}