Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to make a giant door open slowly?

Monica Greenfield
Registered User
Join date: 16 Sep 2006
Posts: 7
12-09-2008 14:20
Hi all, I'm trying to create a massive security door for a bunker that opens up very slowly and ponderously as a big door would IRL. Fans of the Fallout game will know what I'm talking about.

I've tried multiple free and pay scripts for doors, but all of them are insta-open, or nearly instant. This just doesnt look right when a giant door pops open in less than one second. I'm thinking at a minimum my door should take 5 seconds to fully open, maybe longer.

Some scripts have a movement rate control, however as I understand it this works by making the object physical, and it doesnt work if the door is above a critical volume/mass (and I dont know what this value is), or of the door intersects with any other objects.

Does anyone have any ideas how to get around this?

Thanks a lot, I'd be grateful for any help =)
icktoofay Kamachi
Registered User
Join date: 10 Nov 2007
Posts: 17
12-09-2008 14:24
If it's going to slide, then yes, it has to be physical. However, if it's going to rotate, it can use llTargetOmega.

Also, as for that "critical mass", I haven't encountered that before. I'm going to go test that.

Edit: Interesting, there is a critical mass.
Flash Axel
Registered User
Join date: 8 Jun 2008
Posts: 6
Might help someway
12-09-2008 17:09
I found this during my travels, not sure if it helps:

CODE

vector offset = <1,0,0>; //Prim moves/changes size along this local coordinate
float hi_end_fixed = FALSE; //Z axis scaling up or down
//The one with the higher (local) coordinate
float min = 0.01; //The minimum size of the prim relative to its maximum size
integer ns = 40; //Number of distinct steps for move/size change


default
{
state_entry()
{
offset *= ((1.0 - min) / ns) * (offset * llGetScale());
hi_end_fixed -= 0.5;
}

touch_start(integer detected) // reverses scaling
{
integer i;
do llSetPrimitiveParams([PRIM_SIZE, llGetScale() - offset,
PRIM_POSITION, llGetLocalPos() + ((hi_end_fixed * offset) * llGetLocalRot())]);
while ((++i) < ns);
offset = - offset;
}
}
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
12-09-2008 17:18
You can always make it physical, but that can get pretty tricky to control. That is the nicest way to do it.

What I've been gravitating towards are non-physical moves where you keep updating the position or rotation repeatedly so it looks pretty smooth. You need multiple scripts called in turn to get around the .2 sec delay. It will never be as smooth as physical, but it's not bad.

Using llTargetOmega doesn't really work in this case for non-physical because you can't control what all viewers see and getting it to stop at the correct opening isn't reliable.
WolfPup Lowenhar
Registered User
Join date: 26 May 2008
Posts: 6
one option
12-10-2008 07:27
there is one whay you might be able to do it and have it work right if you do not mind useing a mega prim and then mod the simple door script to use a for loop to step through the opening in say .5 degree increments to generate the 'smooth and slow' opening you want
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
12-10-2008 09:45
I say just buy an AeonVox Door :-) The option for closing fast/slow is already incorporated.

Really though ... it's just about changing the "distance opened" through each step or over time (depending on how the door is scripted). Might help if we had a code sample from you so that we could point and say "that part, right there."
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
12-10-2008 09:57
llRotLookAt on a timer will do what you want, really. :s
_____________________
Galena Qi
Registered User
Join date: 9 Sep 2006
Posts: 249
12-10-2008 14:03
Try the Puppeteer script (available on SL exchange or in world or search for the creator, Todd Borst). It's free and is very easy to use to make a door close as slowly as you want. The newest version has the plus that you can attach objects to the door prims after the fact (e.g., doorknobs) without having to animate each prim individually. One caution - if you want to eventually sell the door, you'd have to buy the commercial version of the script.
VonGklugelstein Alter
Bedah Profeshinal Tekstur
Join date: 22 Dec 2007
Posts: 808
12-11-2008 10:07
I just made a huuuuge multi panle hangar door for a Airship and had no problems making it look good .. if you want to find out how I did it.. IM me in world
_____________________
Monica Greenfield
Registered User
Join date: 16 Sep 2006
Posts: 7
12-12-2008 10:29
Well, with the help of some very nice people I have come up with a solution to this now, thanks for the suggestions. =)
Lindal Kidd
Dances With Noobs
Join date: 26 Jun 2007
Posts: 8,371
12-12-2008 11:21
Monica, if it's not proprietary, would you consider posting the script in the Script Library? It could use some more good door scripts.
_____________________
It's still My World and My Imagination! So there.
Lindal Kidd