[Opensim-dev] ScriptEvents Module
Mic Bowman
cmickeyb at gmail.com
Mon Nov 19 05:19:19 UTC 2012
This would be great!
On Nov 18, 2012 6:49 PM, "Melanie" <melanie at t-data.com> wrote:
> Hi,
>
> you may want to hold off on this. In the vein of the custom script
> functions and constants we have already, I have been looking to
> allow custom script events which would be real events.
>
> Melanie
>
> On 19/11/2012 02:28, Diva Canto wrote:
> > Hi,
> >
> > I am working on a module that passes interesting scene events up to the
> > scripts in a manner that's very easy to act upon. An example is attached
> > at the end of this message.
> >
> > Question: What other events would people like to grab? The idea is to
> > have the module do all the complicated logic, and pass only simple facts
> > to the scripts.
> >
> >
> > state_entry()
> > {
> > llSay(0, "Script running");
> > modSendCommand("Script Events", "subscribe|AvatarArrived",
> > llGetKey());
> > modSendCommand("Script Events", "subscribe|LastAvatarLeft",
> > llGetKey());
> > }
> >
> > link_message(integer sender_num, integer num, string message, key
> id)
> > {
> > list parts = llParseString2List(message, ["|"], []);
> > if (llGetListLength(parts) >= 2) {
> > if (llList2String(parts, 1) == "AvatarArrived") {
> > // message is: event|AvatarArrived|True or False <--
> > LocalTeleport or HG Teleport
> > if (llGetListLength(parts) >= 3) {
> > if (llList2String(parts, 2) == "True") {
> > llInstantMessage(id, "Welcome to the Gateway!
> > Choose your destination by walking into one of the teleporters.");
> > llRegionSay(region_channel, "ports foreign");
> > } else {
> > llInstantMessage(id, "Welcome to the Virtual
> > Lab's Gateway! Choose your local destination by walking into one of the
> > teleporters.");
> > llRegionSay(region_channel, "ports local");
> > }
> > } else {
> > llSay(0, "Malformed message " + message + " " +
> > (string)llGetListLength(parts));
> > }
> > play_music();
> > } else if (llList2String(parts, 1) == "LastAvatarLeft") {
> > // message is: event|LastAvatarLeft
> > llRegionSay(region_channel, "ports reset");
> > }
> > }
> > }
> >
> > _______________________________________________
> > Opensim-dev mailing list
> > Opensim-dev at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/opensim-dev
> >
> >
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20121118/e90ce78a/attachment-0001.html>
More information about the Opensim-dev
mailing list