Jump to content

(scripting noob) wanting help with hard coding an owner in a collar that can be given out


Recommended Posts

Posted

is there anyone that can help with hard coding an owner in a script that can be slightly modified to have different uuids, for the use of creating custom collars?

Posted

Sorry, but I don't really understand the question.    If you want to hard-code a value,  you declare a global variable (i.e. up at the top of the script, before default) and assign the value there

key gOwner = someUUID;  (only with a real UUID, obviously) and then, every time you refer to gOwner in the script, the script knows it means that particular UUID.   

That's probably not much use for a collar, since it would mean leaving the script full perms, which probably isn't what you have in mind.  Most collars set the value of gOwner to llGetOwner() (the wearer) by default if there's no other value set, and then let the owner change gOwner to the UUID of their master or mistress in the listen event.

I would warn you that scripting a collar is by no means a trivial endeavour, and not an exercise I would recommend to a beginning scripter.     But if you want to have a go, take a look at https://grimore.org/secondlife/quickcollar, which might give you some ideas.

Posted
6 hours ago, Innula Zenovka said:

Sorry, but I don't really understand the question.

It sounds like they want to create custom collars to be given out to others, where someone (likely themselves) is an owner that cannot be removed.

Posted
9 hours ago, Innula Zenovka said:

Sorry, but I don't really understand the question.    If you want to hard-code a value,  you declare a global variable (i.e. up at the top of the script, before default) and assign the value there

key gOwner = someUUID;  (only with a real UUID, obviously) and then, every time you refer to gOwner in the script, the script knows it means that particular UUID.   

That's probably not much use for a collar, since it would mean leaving the script full perms, which probably isn't what you have in mind.  Most collars set the value of gOwner to llGetOwner() (the wearer) by default if there's no other value set, and then let the owner change gOwner to the UUID of their master or mistress in the listen event.

I would warn you that scripting a collar is by no means a trivial endeavour, and not an exercise I would recommend to a beginning scripter.     But if you want to have a go, take a look at https://grimore.org/secondlife/quickcollar, which might give you some ideas.

i have used open collar scripts to build some collars already but just like Wulfie Reanimator has said i would like to give it out to others. im a noob when it comes to scripting from scratch

Posted (edited)

I guess somebody could look at the OpenCollar scripts, figure out which variable is the list of owners, then plow through them searching and commenting out all the places that variable is assigned. And ideally tidy-up any dialogs or other interfaces that would trigger those assignments. The result will be scripts that cannot be updated unless that's done all over again. I have no idea how often or extensively these scripts get updated, if at all, so maybe that's not a problem.

[ ETA: I don't think it applies here if I'm reading the OP correctly, but if the scripts were to be distributed beyond a very small closed group that's effectively "own use" one would need to be very careful about licensing of whichever source code is used as a base, respecting the distinction between open source and public domain. ]

Edited by Qie Niangao
  • Like 1
Posted
22 minutes ago, Qie Niangao said:

I guess somebody could look at the OpenCollar scripts, figure out which variable is the list of owners, then plow through them searching and commenting out all the places that variable is assigned. And ideally tidy-up any dialogs or other interfaces that would trigger those assignments. The result will be scripts that cannot be updated unless that's done all over again. I have no idea how often or extensively these scripts get updated, if at all, so maybe that's not a problem.

[ ETA: I don't think it applies here if I'm reading the OP correctly, but if the scripts were to be distributed beyond a very small closed group that's effectively "own use" one would need to be very careful about licensing of whichever source code is used as a base, respecting the distinction between open source and public domain. ]

I totally agree - unless there's a full permissions "single owner" collar script out there, since most collars allow > 1 owner (and track the owners in the script, etc.) then the OP will probably need someone to help modify an existing script.

That said, if there's a full permission "single owner" collar script on the Marketplace, that may be a place to start.  Such a script would require the least modifications.

  • Like 1
Posted (edited)
4 hours ago, Love Zhaoying said:

That said, if there's a full permission "single owner" collar script on the Marketplace, that may be a place to start. 

There are several on there that are of the 'fixed owner' to hand out type, but none are open source, so each owner would have to buy a copy.

ETA: I'm Not sure if recommending specific products is warranted, but MP search is pretty hard these days, so the two that I know of are:

https://marketplace.secondlife.com/p/Bespoke-Pet-Collar/16738397 (Overpriced, no personal experience with the quality)

https://marketplace.secondlife.com/p/NRI-Intrusive-Thoughts/21234976 (much more reasonable price; user interface is very eccentric; does not have a visual collar component, but provides all basic collar functionality)

Edited by Quistess Alpha
  • Thanks 2

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...