Picture Frame

The picture frame contains just one script that sends a link message to the root primitive main script requesting a texture and then displays the texture by UUID once the root main script sends a linked message back.

Ideally, the most basic operation of a picture frame in SL is to allow the user to drag and drop a picture onto the picture frame manually. However, since the entire build is completely attached to the avatar, even the wearing avatar is unable to drag and drop a picture such that the system of sending messages back and forth from the picture frame and the root has been chosen as the preferred way of operation.

Script

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2022 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
 
default {
    link_message(integer sender, integer num, string str, key id) {
        if(str == "display") {
            llSetTexture(id, ALL_SIDES);
            return;
        }
    }
 
    touch_start(integer num) {
        if(llDetectedKey(0) != llGetOwner()) {
            return;
        }
 
        llMessageLinked(LINK_SET, 0, "image", NULL_KEY);
    }
    attach(key id) {
        llResetScript();
    }
}

secondlife/begging_shrine/components/picture_frame.txt ยท Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.