//*************************************************************** // Copyright 2008 Centre For Advanced Spatial Analysis, UCL // // Author: Joel Dearden, University College London // // Contact: j.dearden@ucl.ac.uk // // Joel Dearden, // Centre for Advanced Spatial Analysis, // University College London, // 1-19 Torrington Place, // London, // WC1E 7HB // // // This file is part of SLPedEvac. // // SLPedEvac is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // SLPedEvac is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with SLPedEvac. If not, see . // //*************************************************************** integer talkToBuildingComponents = -8927211; integer talk_to_staircase_entry = -2929221; integer talk_to_staircase_top = -7772241; float ped_clear_scan_range = 1.0; //metres default { state_entry() { llListen(talkToBuildingComponents, "", NULL_KEY, ""); llListen(talk_to_staircase_top, "", NULL_KEY, ""); } on_rez(integer start_param) { llShout(talk_to_staircase_entry, "pt:" + (string)llGetPos()); } listen(integer channel, string name, key id, string message) { if(channel == talkToBuildingComponents) { if(message == "demolish") { llDie(); } } if(channel == talk_to_staircase_top) { if(message == "query_state") { llSensor("pedestrian", NULL_KEY, SCRIPTED, ped_clear_scan_range, PI); } } } no_sensor() { llSay(talk_to_staircase_entry, "clear"); } sensor(integer num_detected) { llSay(talk_to_staircase_entry, "notclear"); } }