Jump to content

What will you do with the Advanced Creator Tools Launched Today?


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

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

Recommended Posts

The way I would do it, is have a bear sitting there and, when you touch it, it rezzes an invisible bear (possibly a very small one), to which it passes your uuid and which asks for permssion temporarily to attach to you.   On being granted permssion and attaching, the bear grows to its normal size and becomes visible.

I'd also have a timer running in the bear I rezzed, which would turn itself off when it attaches to you, to de-rez the bear after a minute or wo if you just ignore the permissions request.

Link to comment
Share on other sites

With that bear, it would have to work like this:

  • User clicks "static" bear
  • Static bear stores users' UUID in a list, along with some numeric ID (i.e. something along the lines of [llDetectedKey(),llFloor(llFrand(2000000000))]
  • Static Bear rezzes the to-be-worn version ("Rezzed bear") of itself and passes the generated random number along as parameter to llRez..
  • Rezzed copy talks to static bear and asks for the UUID matching its on_rez() parameter (the random number)
  • Static bear looks up the UUID and passes it to the rezzed bear, then deletes the list entry
  • Rezzed bear now has the UUID of the user it's supposed to ask to attach to, and does so. If no response after a while, rezzed bear copy self destructs.

TThe difference to the non-temp attach is that the person it's attaching to doesn't become the owner of the bear.

Edit: Innula was faster :)

Link to comment
Share on other sites

hi Innula and Jenni, 

I've been trying exactly this way. but I have not had success in getting the uuid for the object to be rezzed.
I did not get a way to pass a key as a parameter, because llRezObject function only accepts integer parameters in
* llRezObject (string inventory, vector pos, vector sible, rotation rot, integer param);
do you could help me with this? if I can send a uuid as parameter, this will solve my problem :)

I'll try passing this random number and go back to what it did.

thank you very much

 

Link to comment
Share on other sites

It's not possible to send an UUID as a parameter for a newly rezzed object but I guess another way could be to use RegionSayTo in an object_rez event inside your static bear script.

object_rez(key id){     llRegionSayTo(id, channel, (string)AvatarUUID);}

 Of course your rezzed copy must have a listen event created on rez and have it removed once the UUID has been recieved.

Link to comment
Share on other sites

if i remember right about the video

in the video is a hat. the hat is on a stand. when you click the hat then it attaches

when you click the hat then the hat tells the stand. the stand then rez another hat on its self for the next person (am pretty sure is how it works)

+

 is kinda how is done on the realms as well with the HUD. at the landing point is a invisible prim. when you collide with it then the prim gives you the HUD from its contents. same everyone else who comes

if go to Tyrahs island where is red/yellow/orange cash machines in the hut. examine the doorway. is a transparent prim across the entrance. when you collide it temp-attach a semi-transparent red prim from its contents to top right your screen. after a few seconds it autodetach

 

Link to comment
Share on other sites

LOL, I knew it, the temp attach is the most useful instruction they have bought out, I have over the last year made a game that has a hud map and things that you need to wear to find things, think I mention it in another thread, I have just fin it, my biggest complaint was that you wear the objects other objects rezzed meant they had to buy for zero to become the owner then click to wear and use, also it stayed in their inventory so I had to tell them to drop it so it deleted, now this include not only tools but all the food and drink.

 

As for the teleport, the quest hud is a lot of sl maps, 13 in total, the hud can tell where you click and prints out the sim and cords that you then have to open the chat window and click on that link.

 

I released the beta version a few weeks ago and got very pissed off that these promised instructions never turned up after I had done all that work, so I gave up a few weeks ago, now I have come back and will now have to mod over 200 parts, a lot of work yes but I only have to put the temp were the attach instruction is and the teleport were the print lm instruction is.

 

So for me these are great instructions and bought me back to sl, maybe that's why you don't like them, lol.

Link to comment
Share on other sites

Another way to do is to use Kira Komarov's Key2Number technique.   That converts the uuid to an integer, which you pass as the start parameter, and then in the rezzed object, you run a sensor, convert each llDetectedKey to an integer, using the same formula, and compare it with the start parameter.  If you get a match, then that's the uuid you're interested in.

 

Link to comment
Share on other sites

about the random channel thing. sometimes you wants to make a sequence of unique numbers that are kinda randomish looking. not just for channel hopping but gift givers and dance AOs and stuff like that

anyways for anyone who wants it. i just put here a way that can make a randomish permutation  without having to use a list like you have to if use a knuth shuffle method

 

// permute.randomish// public domain by elizabeth (16) 2012// makes a "random" permutation of the set[0<mag]// where mag in [1..0x7FFFFFFE]// credits: horst feistel and evariste galois// note: the same (mag + factor + seed + rounds + start index)//       will always return the same permuted set// note: cannot return all permutations of a set//       make a knuth shuffle if you need that// note: can mod as you like. noise generator and mixing, etc//       i just made this way as a complete demointeger gEMag;integer gEHifactor;integer gELofactor;integer gERounds;integer gESeed;integer gENoise;integer gEIndex;// PermuteNoise: galois lfsr to make uniform noisey bitsinteger PermuteNoise(integer mag){    gENoise = (gENoise >> 1) ^ (-(gENoise & 1) & 0xD0000001);    return (gENoise & 0x7FFFFFFF) % mag;}// PermuteNext: arithmetic feistel network mixer. can mod as you likeinteger PermuteNext(){    gENoise = gESeed;    gEIndex++;    if (gEIndex == gEMag)        gEIndex = 0;    integer number = gEIndex;    integer round;    for (round = 0; round < gERounds;  round++)    {        integer xor = number ^ PermuteNoise(gEMag);        if (xor < gEMag)            number = xor;        integer lo = number % gELofactor;        integer hi = number / gELofactor;        integer mult = hi % gELofactor;        lo = (lo + mult * mult + PermuteNoise(gEHifactor)) % gELofactor;        mult = lo % gEHifactor;        hi = (hi + mult * mult + PermuteNoise(gELofactor)) % gEHifactor;        number = (lo * gEHifactor) + hi;    }    return number;}// PermuteInit: call this before calling PermuteNextPermuteInit(integer mag){    // uses galois lfsr so can never be 0    gESeed = (integer)llFrand(0x10000) << 16 | (integer)llFrand(0x10000);    if (gESeed == 0)        gESeed = 1;    // random switch between 7 or 8 rounds to make more sets for some same params    gENoise = gESeed;    gERounds = 8 - PermuteNoise(2);    // should always be at least 1 item in set    gEMag = mag;    if (gEMag < 1)        gEMag = 1;    // pick a random place to start    gEIndex = PermuteNoise(gEMag);    // we have to find a factor close to sgrt    // for integers upto 16 bits then brute works ok    // for performance is actual better to take out of here and do seperately    // i just put here so can see how it all fits together    gELofactor = (integer)llSqrt(gEMag);    // when mag is odd then factor must be odd so can step by 2 in that case    integer step = 1 + (gEMag & 1);    // when intsqrt is even and mag is odd then reduce factor by 1 to make odd    gELofactor -= ((!(gELofactor & 1)) && (step == 2));    while (gELofactor > 2)    {        if(!(gEMag % gELofactor))            jump break;        gELofactor -= step;    }    @break;    gEHifactor = gEMag / gELofactor;}default{    touch_start(integer total_number)    {        llSay(0, "permute 0..9");        integer mag = 10;        PermuteInit(mag);        integer i;        for (i = 0; i < mag; i++)            llSay(0, (string)i + " : " + (string)PermuteNext());        llSay(0, "permute 0..0x7FFFFFFE");        mag = 0x7FFFFFFE;        PermuteInit(mag);        for (i = 0; i < 7; i++)            llSay(0, (string)i + " : " + (string)PermuteNext());    }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4274 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...