Script Reset on Drag-Copy
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
07-31-2008 15:18
I've never noticed this before but is it normal (documented?) behaviour that when you drag-copy an object that the scripts get reset in the original object? The copy seems fine... it's just the original that seems to get reset.
Assuming I'm correct, does anyone know the thinking behind this behaviour? It seems counter-intuitive.
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-31-2008 15:21
From: Pale Spectre I've never noticed this before but is it normal (documented?) behaviour that when you drag-copy an object that the scripts get reset in the original object? The copy seems fine... it's just the original that seems to get reset.
Assuming I'm correct, does anyone know the thinking behind this behaviour? It seems counter-intuitive. I use this all the time. Particularly, when I pull a huge house out of inventory and very carefully place it where I want it, my last step is to drag-copy it, and delete the copy. Poof! and every door and window blind in the house is reset and oriented to its new position. Otherwise I'd have to go and reset every darn one.
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-31-2008 15:34
When you drag copy, the original it the one you drag, the copy is the one that is left behind.
So the scripts in the copy, the one that is in the original location restart, the one you dragged is the original so the scripts continue to run.
|
|
Luke Poplin
Registered User
Join date: 2 Feb 2007
Posts: 32
|
07-31-2008 15:43
From: Avion Raymaker I use this all the time. Particularly, when I pull a huge house out of inventory and very carefully place it where I want it, my last step is to drag-copy it, and delete the copy. Poof! and every door and window blind in the house is reset and oriented to its new position. Otherwise I'd have to go and reset every darn one. Every heard of "Reset Scripts in Selection"? Step 1: Select the house Step 2: Select "Tools" from the menu Step 3" Select "Reset Scripts in Selection"
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-31-2008 18:40
From: Luke Poplin Every heard of "Reset Scripts in Selection"?
Step 1: Select the house
Step 2: Select "Tools" from the menu
Step 3" Select "Reset Scripts in Selection" Yes that's true Luke. But I think it still illustrates why it's intuitive to have the copy you leave behind be the one that gets reset. The thinking behind the behavior, as Pale is asking about, probably has the builder in mind. If I wanted to place a row of houses, or any other scripted objects, it would make sense to have each one be reset as you leave it in its place. Pale, what is it you're doing that makes it seem like it should be the other way around?
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
07-31-2008 19:14
From: Beverly Ultsch When you drag copy, the original it the one you drag, the copy is the one that is left behind.
So the scripts in the copy, the one that is in the original location restart, the one you dragged is the original so the scripts continue to run. Yep, I used to think the copy was the one I moved, but I learned eventually that wasn't so. 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-31-2008 22:34
I would so prefer an 'on_rez' or some kind of 'changed' event to automatic script resetting.
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
08-01-2008 00:44
Thanks for the replies! This isn't causing me a problem as such. I was asked the question by a person who uses a product of mine and I was intrigued by the behaviour. It certainly makes more sense that the 'new' object might be subject to a script reset. As to whether the original should be the one that stays in position or the one that gets dragged, hm... well, to me intuition says it should be the one that doesn't move. Presumably that means a moving_start/end event gets trigged in the original. As to what behaviour is more desirable, I guess that depends on what you're trying to do. Drag-copy sometimes has certain "ease-of-alignment' advantages over rezzing from inventory and if persistent variables are involved, a script reset might not be that useful. Anyway, at least I now know that this is the normal behaviour and not some strange quirk of my scripts. 
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
08-08-2008 14:21
From: Darien Caldwell Yep, I used to think the copy was the one I moved, but I learned eventually that wasn't so.  lol, gawd, me too. also if a friend with edit rights shift+drags your object, the new object is in their ownership with whatever new owner perms you left/set. i built an object, my friend wanted to show me an idea, without altering the original. she thought the one she dragged was her copy, so she played around with it and then later realized it was the original. problem was, the new owner perms on her copy was the default trans only, so even if i took it back, i couldn't edit/copy it. wasn't too much work for me to fix the original, but that could pose hazardous (better choice of word anyone? lol) if it was something more complex
|