Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //start_unprocessed_text
- /*integer RANGE = 10; /|/ range in meters to detect objects
- integer TOUCH_DELAY = 1; /|/ delay in seconds between touches
- default
- {
- on_rez(integer start_param)
- {
- llSensorRepeat("", "", AGENT, RANGE, PI, TOUCH_DELAY);
- }
- sensor(integer num_detected)
- {
- for (integer i = 0; i < num_detected; i++)
- {
- key detected_object = llDetectedKey(i);
- if (llGetInventoryType(llGetInventoryName(detected_object, 0)) == INVENTORY_OBJECT && llGetObjectType(detected_object) == OBJECT_TYPE_PRIM)
- {
- llSay(0, "Touching object: " + llDetectedName(i));
- llSetTouchText("Touched");
- llTouchObject(detected_object);
- llSleep(TOUCH_DELAY);
- }
- }
- }
- }
- */
- //end_unprocessed_text
- //nfo_preprocessor_version 0
- //program_version Firestorm-Releasex64 6.6.8.68380 - afro707
- //last_compiled 04/29/2023 16:23:09
- //mono
- integer RANGE = 10;
- integer TOUCH_DELAY = 1;
- default
- {
- on_rez(integer start_param)
- {
- llSensorRepeat("", "", AGENT, RANGE, PI, TOUCH_DELAY);
- }
- sensor(integer num_detected)
- {
- for (integer i = 0; i < num_detected; i++)
- {
- key detected_object = llDetectedKey(i);
- if (llGetInventoryType(llGetInventoryName(detected_object, 0)) == INVENTORY_OBJECT && llGetObjectType(detected_object) == OBJECT_TYPE_PRIM)
- {
- llSay(0, "Touching object: " + llDetectedName(i));
- llSetTouchText("Touched");
- llTouchObject(detected_object);
- llSleep(TOUCH_DELAY);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement