Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
archiv:opensim:downloads:scripts:zero_lag_poseball [2024/01/24 16:39] – Externe Bearbeitung 127.0.0.1 | archiv:opensim:downloads:scripts:zero_lag_poseball [Unbekanntes Datum] (aktuell) – Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ===== Zero Lag Poseball ===== | ||
+ | |||
+ | < | ||
+ | // Jippen Faddoul' | ||
+ | // Copyright (C) 2007 Jippen Faddoul | ||
+ | // This program is free software: you can redistribute it and/or modify | ||
+ | // it under the terms of the GNU General Public License version 3, as | ||
+ | // published by the Free Software Foundation. | ||
+ | // | ||
+ | // This program 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. | ||
+ | // GNU General Public License for more details. | ||
+ | // | ||
+ | // You should have received a copy of the GNU General Public License | ||
+ | // along with this program. | ||
+ | |||
+ | |||
+ | |||
+ | //This text will appear in the floating title above the ball | ||
+ | string TITLE=" | ||
+ | //You can play with these numbers to adjust how far the person sits from the ball. ( < | ||
+ | vector offset=< | ||
+ | |||
+ | ///////////////////// | ||
+ | string ANIMATION; | ||
+ | integer visible = TRUE; | ||
+ | key avatar; | ||
+ | |||
+ | vector COLOR = < | ||
+ | float ALPHA_ON = 1.0; | ||
+ | float ALPHA_OFF = 0.0; | ||
+ | |||
+ | show(){ | ||
+ | visible = TRUE; | ||
+ | llSetText(TITLE, | ||
+ | llSetAlpha(ALPHA_ON, | ||
+ | } | ||
+ | |||
+ | hide(){ | ||
+ | visible = FALSE; | ||
+ | llSetText("", | ||
+ | llSetAlpha(ALPHA_OFF, | ||
+ | } | ||
+ | |||
+ | default{ | ||
+ | state_entry() { | ||
+ | llSitTarget(offset, | ||
+ | if((ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, | ||
+ | llOwnerSay(" | ||
+ | ANIMATION = " | ||
+ | } | ||
+ | llSetSitText(TITLE); | ||
+ | show(); | ||
+ | } | ||
+ | |||
+ | touch_start(integer detected) { | ||
+ | // | ||
+ | if(visible){ hide(); } | ||
+ | else { show(); } | ||
+ | } | ||
+ | |||
+ | changed(integer change) { | ||
+ | if(change & CHANGED_LINK) { | ||
+ | avatar = llAvatarOnSitTarget(); | ||
+ | if(avatar != NULL_KEY){ | ||
+ | //SOMEONE SAT DOWN | ||
+ | hide(); | ||
+ | llRequestPermissions(avatar, | ||
+ | return; | ||
+ | }else{ | ||
+ | //SOMEONE STOOD UP | ||
+ | if (llGetPermissionsKey() != NULL_KEY){ llStopAnimation(ANIMATION); | ||
+ | show(); | ||
+ | return; | ||
+ | } | ||
+ | } | ||
+ | if(change & CHANGED_INVENTORY) { llResetScript(); | ||
+ | if(change & CHANGED_OWNER) | ||
+ | } | ||
+ | |||
+ | run_time_permissions(integer perm) { | ||
+ | if(perm & PERMISSION_TRIGGER_ANIMATION) { | ||
+ | llStopAnimation(" | ||
+ | llStartAnimation(ANIMATION); | ||
+ | hide(); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||