scripting:samples:buildingproxevents
This is an old revision of the document!
Building Proximity Event Sample
$kBuildingIDForProxEvents = 5
$kProxDistanceMeters = 40
$kBuildingHiddenTime = 30
// When player logs in activate a building proximity event for them
// This means that whenever this player gets within range of the building,
// the "BuildingProxEnter" event will be triggered
Event( "PlayerLogin", "" )
{
sysActivateBuildingProximityEvent( $kBuildingIDForProxEvents, $kProxDistanceMeters )
}
// This event will be triggered when the player gets within 40m of Building Number 5
// The 'buildingspecialevent' command with mode 9 will hide the building for 30 seconds
Event( "BuildingIDProxEnter", "$kBuildingIDForProxEvents" )
{
*grantitem %PLAYER%,1,Special Item
*setvehicle %PLAYER% 3
*explodebuilding $kBuildingIDForProxEvents
*buildingspecialevent $kBuildingIDForProxEvents 9 $kBuildingHiddenTime
}
scripting/samples/buildingproxevents.1683228603.txt.gz · Last modified: (external edit)
