Jump to content

Online/Offline Board Question


WhyTheGreat
 Share

You are about to reply to a thread that has been inactive for 3125 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello, I am trying to make a online/offline board, the top part being a photo of someone and the bottom being online/offline. I read some articles and seen some posts about doing it with 2 boxes and using 2 prims for it. I could do that pretty easily, but I am looking to save some prims if I can and use 1 prim for the photo and online/offline part. I have seen boards do it that way so it should be possible, but found no good explanation on how it's done. Could someone possibly post a link or in the proper direction for this? Thanks for your time!

Link to comment
Share on other sites

Sorry I will try to clarify a bit better.

I am trying to have the top a picture of the avatar and the bottom a notification of online or offline (just two textures switching). I have looked through some scripts to see examples and they usually say use one prim for the picture of the avatar, and one prim for the online/offline texture part. However, I have seen ones that use just one prim doing the same concept. I know how to code it for the most part, but I am just wondering if there is a possible way to do that with one prim instead of two. Is there a way to assign a texture to the bottom part of a face only and another one to the top part by chance? That is the part I'm confused on.

Link to comment
Share on other sites

You can only assign one full texture per face.

You can, however, hollow and cut a cube to give you a prim with two faces on one side. (I'll upload a pic and attach, demonstrating).



In the above picture, each texture-able face has a different shade of green assigned.

---

Script-wise, you shouldn't have any problem adjusting the functions already in your example. Just remember you can use the same link number (LINK_THIS or LINK_ROOT), and just specify differing faces.

Link to comment
Share on other sites

You could:

1. Use two prims, link them, and make the linkset Convex Hull so that it has a L.I. of 1.0.  Put the photo on one prim, put your ON/OFF indicator on the other.

or

2. Use one cube prim, rotate it 45 degrees around its Y axis, and flatten it on X and stretch it on Z so that you have two square faces visible and a L.I. of 1.0. Put the photo on one face, put your ON/OFF indicator on the other.

or

3. Make a flat mesh object with two square faces (and an L.I. of 1.0). Put the photo on one face, put your ON/OFF indicator on the other.

  • Like 1
Link to comment
Share on other sites

Scroll way down this page...

http://ayumicassini.blogspot.com/2009/07/ultimate-guide-to-prim-twisting.html

You'll see instructions for torturing a cube to orient more than one face in the viewing direction. I think the simplest would be to squish a cube into a rectangle and then slant or taper the heck out of it until you get two faces of the proportions you want, facing in the same direction. That's approximately what Rolig suggested.

  • Like 1
Link to comment
Share on other sites

Okay so I went with the first option, however I am having a issue. When I put two cubes beside eachother and make the linkset convex hull, Then I code it to change the bottom and top texture I have a issue here. When I do llSetTexture like this

" llSetTexture("infosign", 1);" It only works on the top part, if I click edit and select faces it tells me the top and the bottom part are 1 and the back 2 sides are both 3, is there any way around that issue by chance?

 

Thanks

Link to comment
Share on other sites

I vaguely remember being a child when I was young too.  There was a lot of that going around at the time. And as for getting worse after 50 .... well ... I'm not getting any better.  As the Pogo comic strip reminded our generation once, "From here on up, it's downhill all the way."

Not that this has anything to do with LSL scripting .....  :smileywink:

Link to comment
Share on other sites

Worked perfect, Thank you so much!

I do have one more question, I am trying to allow another avatar to click on it and have the permissions to add their own picture to it. I can't figure out how to give them the proper permissions via script to do that or if it's even possible. Would you by chance know the best route for that kind of thing?

 
Link to comment
Share on other sites

There's a script in the wiki that applys the profile picture for whoever clicks it to a prim...

http://wiki.secondlife.com/wiki/Get_Profile_Picture

No "permission" is necessary.

If you want people to be able to place any picture from their inventory on the prim, that would require them to obtain the UUID of the picture and pass it to the script. In Firestorm, you obtain the UUID of a snapshot in inventory by right-clicking and selecting "Copy UUID". Upon touching the prim, it could emit instructions like:

  • Find the image you want to paint me with in your inventory.
  • Right-click on it and select "Copy UUID"
  • Click in the public-chat message window and type "Ctrl-V" to paste the UUID.
  • Press Return to send me the UUID.

The script would be listening on the public chat channel (0) for anything resembling a UUID (a check for 36 characters long might be enough), which it would then use just like the UUID obtained from the avatar profile in the example script.

Link to comment
Share on other sites

Thanks I did find that but I am looking more for something that allowed them to put their own texture into the object rather then storing their display picture,  I know there is a way because I do it with advertising boards regularly. I guess I could do profile photo but I rather that be last option kind of thing.

Link to comment
Share on other sites


WhyTheGreat wrote:

... but I am looking more for something that allowed them to put their own texture into the object rather then storing their display picture, ...

There's llAllowInventoryDrop(). Be sure to read the "Caveats" section of that wiki page because this is one of the trickier functions in LSL to get working. And be sure to test with an alt or confederate who doesn't otherwise have Modify permissions on the object.

(I say it's "tricky" but it's not as scary as it looks in the wiki's code sample, which is doing all sorts of other, more complicated stuff.)

(Also, be aware that this can become a compliance issue: While the function is enabled you have no way to limit who might add a texture to the prim nor what texture they might add, nor can you be completely sure who added it. It's generally safer -- but not completely safe -- to only turn it on briefly, on demand, and keep some record of who requested it.)

Link to comment
Share on other sites

This is likely the best way for me, as I have a sysem already in the script that ensures it's the proper avatar. Now I am having one small issue with it I can't seem to figure out. Here is my best to explain it.

My only issue is that I can get the owner to upload a uuid to a dialog text box and then set a texture face to that texture, however it is just not allowing me to do it on a alt account, so is there some permissions I am missing or something for that to work properly by chance?

Thanks!

Link to comment
Share on other sites

This works with owner and non owner to change the texture.

integer  gListener;default{    touch_start(integer total_number)    {        // See 'discussion' page for more comments on choosing a channel and possible left-open listener        integer channel = -13572468;        // "" saves byte-code over NULL_KEY        gListener = llListen( channel, "", "", "");             llTextBox(llDetectedKey(0), "Some info text for the top of the window...", channel);    }    listen(integer channel, string name, key id, string message)    {        llListenRemove(gListener);        llSay(0, "You wrote: " + message);                llSetTexture(message, 3);    }}

My script however does now work the same way.

 

    listen(integer channel, string name, key id, string message)    {        llListenRemove(gListener);        llSay(0, message);                integer refundAmount;         llListenRemove(listenQueryID);         if (message == "Info")        {            dispData();            llGiveInventory(id, infoNotecard);        }        else if (message == "Refund Time")        {            llDialog(id, "Are you sure you want to TERMINATE your lease and refund your money, minus a L$" + (string)refundFee + " fee?", ["YES", "NO"], setupDialogListen());        }        else if(message == "Status")        {            llDialog(id, "You can change the status on your board!", ["Online", "Offline", "Back"], setupDialogListen());            }        else if(message == "Online")        {            llSetLinkTexture( 2, "OnlineTexture", 3 );        }        else if(message == "Offline")        {            llSetLinkTexture( 2, "OfflineTexture", 3 );            }        else if(message == "Back")        {            llDialog(id, "Select a Option Below!\nLikes: " + (string)likes, ["Refund Time", "Info", "Status"], setupDialogListen());              }        else if(message == "Upload")        {            // See 'discussion' page for more comments on choosing a channel and possible left-open listener            integer channel = -13572468;            // "" saves byte-code over NULL_KEY            gListener = llListen( channel, "", "", "");                llTextBox(id, "Copy and Paste your pictures UUID and press submit!", channel);                     }        else if (message == "Submit")        {            string playerPicture = message;            llSetTexture(playerPicture, 3);         }

I don't know what I am missing here

Thanks

Link to comment
Share on other sites

I suggest taking a good close look at that very last if test

else if (message == "Submit")        {            string playerPicture = message;            llSetTexture(playerPicture, 3);         }

The message is never going to be "Submit", and you're never capturing the UUID that's in the text box.  (I predict a "D'uh!" and a dope slap about here.  :smileywink: )  Aside from that, the code ought to work.  If it were mine, though, I would make one slight change, as a precaution against clumsy copy/pasting:

            string playerPicture = llStringTrim(message,STRING_TRIM);            llSetTexture(playerPicture, 3); 

 

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3125 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...