• Bitte schaltet eure Ad Blocker aus. SLinfo kann nur betrieben werden, wenn es durch Werbung Einnahmen erzielt. Vielen Dank!!
  • Wir freuen uns, wenn du dich in unserem Forum anmeldest. Bitte beachte, dass die Freigabe per Hand durchgeführt wird (Schutz vor Spammer). Damit kann die Freigabe bis zu 24 Stunden dauern.
  • Wir verwenden Cookies, um Inhalte und Anzeigen zu personalisieren, Funktionen für soziale Medien anbieten zu können und die Zugriffe auf unsere Website zu analysieren. Sie geben Einwilligung zu unseren Cookies, wenn Sie unsere Webseite weiterhin nutzen.

Vorhangsteuerung - Berechtigung von Owner auf alle erweitern

Uri Emerald

Nutzer
Liebe Leute,

ich baue gerade einen Nachtclub mit folgendem Gimmick: Von einer Steuertafel sollen Theatervorhänge gesteuert werden. Ich verwende dazu die Das Vorhangscript von Zilla Larsson und das Vorhang-Steuerungsscript von DeniseHoorn Slade.
Die Vorhänge bestehen aus Mesh und sehen toll aus, wenn sie sich bewegen.

Nun habe ich noch das folgende Problem. Wenn ich das Teil bediene, klappt alles super. Wenn dagegen jemand anders das alles ausprobieren möchte, dann läuft gar nichts:

Hier das Vorhang-Steuerungsscript:

// Copyright (C) 2009 DeniseHoorn Slade
// 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. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>

integer channel = -95769;
list MENU_MAIN = ["Front", "Back", "All", "Reset"]; // the main menu

default
{
on_rez(integer start_param) {
llResetScript();
}

state_entry()
{
llListen(channel,"",llGetOwner(),"");
llInstantMessage(llGetOwner(),"Curtain ready to use...");
}

touch_start(integer total_number)
{
llDialog(llDetectedKey(0), "What do you want to do?\n\n- 'Front' moves front-curtains\n- 'Back' moves back-curtains\n- All moves all curtains\n- Reset resets the scripts when size was changed", MENU_MAIN, channel);
}

listen(integer channel, string name, key id, string message)
{

}
}


Die Vorhänge selber laufen mit dem folgenden Script:

//When touched the prim is retracted towards one end and when touched again stretched back out.
//
//Prim moves/changes size along the local coordinate specified in the offset vector below.
//
//To change the overall size, edit the prim when stretched out and reset the script when done.
//
//The script works both in unlinked and linked prims.
//
// Copyright (C) 2008 Zilla Larsson
// 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. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>
integer channel = -95769;

vector offset = <1,0,0>; //Prim moves/changes size along this local coordinate
float hi_end_fixed = TRUE; //Which end of the prim should remain in place when size changes?
//The one with the higher (local) coordinate?
float min = 0.3; //The minimum size of the prim relative to its maximum size
integer ns = 10; //Number of distinct steps for move/size change

open_me()
{
integer i;
do llSetPrimitiveParams([PRIM_SIZE, llGetScale() - offset,
PRIM_POSITION, llGetLocalPos() + ((hi_end_fixed * offset) * llGetLocalRot())]);
while ((++i) < ns);
offset = - offset;
}

default {
on_rez(integer start_param)
{
llResetScript();
}

state_entry() {
llListen(channel, "", llGetOwner(), "");
offset *= ((1.0 - min) / ns) * (offset * llGetScale());
hi_end_fixed -= 0.5;
}

listen(integer channel, string name, key id, string message)
{
if (message == "Front") {
open_me();
} else if (message == "All") {
open_me();
} else if (message == "Reset") {
llInstantMessage(llGetOwner(),"done...");
llResetScript();
}
}
}


Meine Bitte: Was muss ich abändern, damit jeder und jede die Vorhänge bedienen können?

Ich bedanke mich jetzt schon für sachdienliche Ideen und Hinweise!

Viele Grüße,
Uri Emerald
 
Eigentlich nur das erste llGetOwner() im Vorhangscript durch "" ersetzen und evt. noch das zweite durch id:

state_entry() {
llListen(channel, "", "", ""); // <<<<< da
offset *= ((1.0 - min) / ns) * (offset * llGetScale());
hi_end_fixed -= 0.5;
}

listen(integer channel, string name, key id, string message)
{
if (message == "Front") {
open_me();
} else if (message == "All") {
open_me();
} else if (message == "Reset") {
llInstantMessage(id,"done..."); //<<<< und da
llResetScript();
}
}
 
P.S. Das erste Script könntest noch kürzen:

integer channel = -95769;
list MENU_MAIN = ["Front", "Back", "All", "Reset"]; // the main menu

default
{
on_rez(integer start_param) {
llResetScript();
}

state_entry()
{
llInstantMessage(llGetOwner(),"Curtain ready to use...");
}

touch_start(integer total_number)
{
llDialog(llDetectedKey(0), "What do you want to do?\n\n- 'Front' moves front-curtains\n- 'Back' moves back-curtains\n- All moves all curtains\n- Reset resets the scripts when size was changed", MENU_MAIN, channel);
}

}
 
Ihr seid toll... aber aus irgendeinem Grunde funktionieren die Vorhänge nur bei mir, nicht aber bei anderen... wo liegt der Fehler, was ist verkehrt???
 
Hallo Bittersweet, ich habe genau die Zeilen ins Script kopiert. Leider konnte meine Bekannte trotzdem die besagten Gardinen nicht bedienen.
 
An alle, an alle: Ich habs!!! Dank Eurer guten Unterstützung habe ich verstanden, wo mein Fehler war! Ich bin Euch sehr dankbar für den netten Support!

Mit vielen Grüßen,
Euer Uri
 

Users who are viewing this thread

Zurück
Oben Unten