Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script to 'Mirror' Right-hand object into Left-hand object

Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 13:29
After many frustrating hours, my scripted prim hand attachment is done. For one side. I'm hoping to find a script that will let me mirror the right hand into a left-hand, because rebuilding this very complex object does not seem like a good time to me. I'm already going to have to put a hide script in all but 3 of the 49 prims, and make sure to link them in a very, very specific order or be forced to re-write my show/hide script all over again, also not my idea of a good time.

I know there is a script to do this. Back in the day, Jeffrey Gomez posted one that I believe does what I am asking for. I was even smart enough to copy it before he took it down and put up his gimped one. But I can't get it to work.

I'm not trying to copy someone else's work. This is MY hand. I just want a left-hand version of it. Can anyone help me with this?
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
04-03-2006 14:01
a hide cript in the 49, prims? that's crazy there is hide scripts where one scrpt is needed for hiding asmany prims as you want in a link
_____________________

tired of XStreetSL? try those!
apez http://tinyurl.com/yfm9d5b
metalife http://tinyurl.com/yzm3yvw
metaverse exchange http://tinyurl.com/yzh7j4a
slapt http://tinyurl.com/yfqah9u
Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 14:08
From: Kyrah Abattoir
a hide cript in the 49, prims? that's crazy there is hide scripts where one scrpt is needed for hiding asmany prims as you want in a link


If you've got it, give it. I know the numbers of all of the prims, if there is a way to hide them from a script not contained in the prim itself I would love to know how.

Do you know how to mirror it, though?
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
04-03-2006 15:14
I would also like to see a 'mirror linkset' script. It would be invaluable for builders, allowing us to easily offer floor plans that are mirror images of each other!

As for show/hide scripts, it should be possible to put an identical 'listener' script in all but the root prim, which would check something like the child prim's name or description field, and base it's actions on that. So for example, if you needed the root script to hide 4 parts for 'thumb #2', it could send a message to the listener that would only hide those prims with "T2" in the description field.

Or you could start with identical listeners, but have one or more variables stored in each listener script that identifies which show/hide grouping it belongs to.

With that, the link numbers and linking order wouldn't matter, as long as the control script remained in the root prim.

If you only needed to show or hide all the child prims at once, that can be done from the root prim, with no listener scripts. At least, I believe that it can. Haven't tried yet.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
04-03-2006 15:25
There is one, but it was pretty much banned and you have to do dances for people to get copies of it anymore.

It was banned because LL couldn't create a cohesive permissions system and it allowed people to make "exact copies" (minus textures and scripts (so they aren't "exact" copies, but that's what people claimed) of any copyable object in-world.

You may try searching the script forum. Sometimes it gets reposted and mysteriously disappears every now and then.
Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 15:46
From: Aaron Levy
... it allowed people to make "exact copies" (minus textures and scripts (so they aren't "exact" copies, but that's what people claimed) of any copyable object in-world. ...


That's great! That's exactly what I need. I can re-apply the textures myself. I own the object, I built it. There is no reason I should not be able to mirror my own object. Do YOU have this code? Can I dance for you?
Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 15:49
From: Ceera Murakami
I would also like to see a 'mirror linkset' script. It would be invaluable for builders, allowing us to easily offer floor plans that are mirror images of each other!

As for show/hide scripts, it should be possible to put an identical 'listener' script in all but the root prim, which would check something like the child prim's name or description field, and base it's actions on that. So for example, if you needed the root script to hide 4 parts for 'thumb #2', it could send a message to the listener that would only hide those prims with "T2" in the description field.

Or you could start with identical listeners, but have one or more variables stored in each listener script that identifies which show/hide grouping it belongs to.

With that, the link numbers and linking order wouldn't matter, as long as the control script remained in the root prim.

If you only needed to show or hide all the child prims at once, that can be done from the root prim, with no listener scripts. At least, I believe that it can. Haven't tried yet.


OK, that's not the problem. How do I turn a prim alpha without putting a script in the child prim? Using only the root prim? What is the command?

Currently, I send a linked message to the linked prim, which has a script in it that will hide and unhide that prim. If you know of a command that can llSetAlpha a child prim while being in a script in the root prim, I could use your idea.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-03-2006 15:54
That would be http://secondlife.com/badgeo/wakka.php?wakka=llSetLinkAlpha
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
04-03-2006 15:55
llSetLinkAlpha

http://secondlife.com/badgeo/wakka.php?wakka=llSetLinkAlpha

You need to know the link number, which is easy to do if you name the prims uniquely, then run llGetLinkName in a loop and get the link numbers associated with all your named prims.
Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 16:49
From: Ziggy Puff
llSetLinkAlpha

http://secondlife.com/badgeo/wakka.php?wakka=llSetLinkAlpha

You need to know the link number, which is easy to do if you name the prims uniquely, then run llGetLinkName in a loop and get the link numbers associated with all your named prims.


Wow. That'll make my script a whole lot simpler. I already know the link numbers, now I just need to fix the script and remove all the excess ones.

Any idea about the mirroring? I'm kind of stuck in a rut without it. Rebuilding this had would seriously take all day to perfect.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
04-03-2006 16:56
Well, I know I'd got Jeffrey's script to work once, a long time ago. I don't know if that's the one that's now banned, or what. If you get a hold of me in-game tonight, I could try to help you. Unofficially, I guess :)
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
04-03-2006 17:14
easy:

CODE

integer i;
integer j = llGetNumberOfPrims();
for (i = 1;i <= j;i+=1)
{
//we assume that any child prim named "hide" must be hidden
if(llGetLinkName(i) == "hide")
llSetSetLinkAlpha(i,0.0,ALL_SIDES);
}
_____________________

tired of XStreetSL? try those!
apez http://tinyurl.com/yfm9d5b
metalife http://tinyurl.com/yzm3yvw
metaverse exchange http://tinyurl.com/yzh7j4a
slapt http://tinyurl.com/yfqah9u
Vilkacis Mason
Registered User
Join date: 30 Aug 2005
Posts: 49
04-03-2006 20:40
OK, I got it mirrored now. I tried llSetLinkAlpha, but I found it was actually slower. Perhaps I'll do more tests later to be sure, but for now it works how I have it and I need to finish my day.

Thank you everyone for the help!
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
04-04-2006 00:04
From: Ziggy Puff
Well, I know I'd got Jeffrey's script to work once, a long time ago. I don't know if that's the one that's now banned, or what. If you get a hold of me in-game tonight, I could try to help you. Unofficially, I guess :)


It's not banned, as far as I know; it's just that the few scripters who can make a script to do the required work are so far responsible enough not to release it, ever since the big debarcle surrounding the first public release of such a script. Pragmatically the functionality is as legitimate as a DVD burner... I backup lots of data, burn Linux CDs, make my own DVD movies, and so on with my burner. I could also pirate software and rip movies from my friends DVDs; but I don't.

There is a mirror script in the script library (search term: "mirror";) that mirrors the prim it is put in; in the case of the original poster's situation this also has the advantage of keeping textures (although they may need adjusting) and alpha and any other scripts, since this mirror script just manipulates the position and shape of the prim it it put in. This is NOT the same as the original mirror script that caused the fuss; the worst this lets you do is mirror an item and have it retain the same permissions. Until shoe stores start selling left and right shoes independently this is a non-issue. :-)
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
04-04-2006 08:17
I used to have the original, looks like the one I have now is the new version, where it changes the existing prim instead of a copy. That's what Vilkacis got working yesterday, and it's enough, since he owns (and has created) the object he's trying to mirror.

And yes, I can see why the original was iffy, but this one is more 'legit'.
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
04-04-2006 09:07
From: Ziggy Puff
I used to have the original, looks like the one I have now is the new version, where it changes the existing prim instead of a copy. That's what Vilkacis got working yesterday, and it's enough, since he owns (and has created) the object he's trying to mirror.

And yes, I can see why the original was iffy, but this one is more 'legit'.


Ziggy? Could you contact me in-world and get me a copy of that version of the mirroring script? I have several small houses that I have built recently, where they are entirely my objects, and my textures - I have full rights. I would love to be able to rez each one, apply some script magic, and make it a mirrored floorplan!

Please?

*Bats her pretty green eyes, and looks cute*
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
04-04-2006 09:34
Leave me an in-game IM, and I'll give you a copy when I get online tonight.
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
04-04-2006 11:07
Thanks Ziggy! The IM has been left for you, in-world.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-04-2006 14:56
From: Aaron Levy
There is one, but it was pretty much banned and you have to do dances for people to get copies of it anymore.

It was banned because LL couldn't create a cohesive permissions system and it allowed people to make "exact copies" (minus textures and scripts (so they aren't "exact" copies, but that's what people claimed) of any copyable object in-world.

You may try searching the script forum. Sometimes it gets reposted and mysteriously disappears every now and then.

Dude, where did you hear that from? Fact is, the commands to do this stuff remain in full, and the Lindens were actually rather polite to me on the issue. Banned by me? Well... that's a bit of a longer story.


I effectually rewrote the script so it flips existing prims and distribute that version. The only reason the earlier version is so hard to find is I stopped distributing it a while back on purpose. I still have a copy in my inventory and, to the best of my knowledge, a Linden did not swoop down and take it from me, nor "ban" it. And, given the relative ease of the commands used, I'm surprised y'all don't go figure out how it works. ;)


If anyone here would like a prebuilt copy of the "fixed" version, simply drop me an IM in-world and I'll get you one as soon as possible. As for the earlier version, if you already have a copy, the reason it is not working is this: it relies on a quick chat response time. I leave you to figure out the rest, at your own peril.

Honestly, this issue should be moot, as this sort of thing is an obviously-needed Linden feature. I should not have to dance around the issue, either. And given I was yelled at by a nice chunk of the community for the first version, I at least hope you can understand my position here. :o

Because frankly, it'd still be posted if people didn't go out of their way to abuse the power and place the problem at my doorstep.
_____________________
---
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
04-04-2006 17:38
From: Jeffrey Gomez
Honestly, this issue should be moot, as this sort of thing is an obviously-needed Linden feature. I should not have to dance around the issue, either. And given I was yelled at by a nice chunk of the community for the first version, I at least hope you can understand my position here. :o

Because frankly, it'd still be posted if people didn't go out of their way to abuse the power and place the problem at my doorstep.


The Lindens just don't want responsibility for copying of this nature. ^.^

No, there's nothing wrong with the script, it's just the people. Too many people shooting themselves in the foot, so to speak.
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
04-04-2006 21:27
From: Feynt Mistral
The Lindens just don't want responsibility for copying of this nature. ^.^

No, there's nothing wrong with the script, it's just the people. Too many people shooting themselves in the foot, so to speak.


The gun manufacturer isn't responsible for what you do with the gun. It's your right to shoot yourself in the foot.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
04-04-2006 22:13
From: Strife Onizuka
The gun manufacturer isn't responsible for what you do with the gun. It's your right to shoot yourself in the foot.


I'm not blaming the guns, I'm blaming the people using them. The gun manufacturers, seeing too many people shooting themselves have decided to release safer guns.

Or rather, to end the analogy and be direct, the ability to outright copy an object was too tempting for some malicious freebie wanters (or worse, malicious copy resellers). They ruined it for the rest of us with their antics.
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
04-05-2006 01:34
From: Jeffrey Gomez
And, given the relative ease of the commands used, I'm surprised y'all don't go figure out how it works. ;)


Maybe I did. Maybe I like scripting challenges. Maybe I created my own from scratch, and incorporated a posing stand stand routine into into it for extra-easy attachment allignment and creation.

*rezes black cube over Auto-Rez Mirror Posing Stand v1.4*

Nothing to see here.



On a slightly more serious note these scripts are tools, and excessivly useful tools, so it's a shame those of us who can make them need to pretend they don't exist. And more of a shame we can't just give them to other builders to help them out.


From: Jeffrey Gomez
And given I was yelled at by a nice chunk of the community for the first version, I at least hope you can understand my position here.


Jeffrey, I love your tools and I'm very happy you didn't let an angry mob stop you making more. *smiles*
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
04-05-2006 01:58
From: Nepenthes Ixchel
*rezes black cube over Auto-Rez Mirror Posing Stand v1.4*


Can I get one of those? that sounds really useful.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
04-05-2006 04:03
From: Strife Onizuka
Can I get one of those? that sounds really useful.


No.

It is really useful, but I don't want an angry mobs waving particle effect torches and prim pitchforks (with bling) as they blame me for destroying Second Life. Sorry, but Jeffery's already been crucified over this and I'm not going the same way.

So:

0) Set up mirror in line with posing stand.

1) Get on posing stand

2) Copy-drag the attachment (which is not attached at this point)

3) Unlink the new one (which is where teh original was)

4) Put Jeffery's mirror script in each prim

5) Link the mirrored prims

6) Select the original attachment

7) Hit control-Z to undo the moze. Or just move the item back to where it was.
1 2