Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

discussion: 1 prim double sliding glass door

Meetmy Destiny
Registered User
Join date: 5 Dec 2007
Posts: 5
02-08-2008 03:54
ahhhhhhhhhhhhhh okay,
thanks.
this is great.........................


greetings Meetmy
Sop Ashdene
Registered User
Join date: 14 Oct 2008
Posts: 4
10-26-2008 09:00
i got no idea why after saving the script into a box-like prim it turns into a triangle.
and upon touch the triangle change into the box and back to the triangle.
please help im new to all these.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
10-26-2008 09:49
Who dug this old thread and made an old fox wake up? :D

The first thing you should learn is a function, "llSetPrimitiveParams".
And you have to get parameters you want such as a box and a triangle by llGetPrimitiveParams.
Aha, a triangle? It's a pyramid, isn't it?
And you need also to know how to switch by touching.

This is a sample.
CODE
integer touchFlag;

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>]);
}
touch_start(integer total_number)
{
if(!touchFlag)
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>]);
}
else
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>]);
}
touchFlag = !touchFlag;
}
}
_____________________
:) Seagel Neville :)
Sop Ashdene
Registered User
Join date: 14 Oct 2008
Posts: 4
10-26-2008 10:26
oops sorry for waking an old fox up.
but i really got blurred by those codes.
i wanted a rectangular door and upon touch it slides open
i dont want a pyramid. ><

thanks alot for your reply thou.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-26-2008 11:37
just flatten the box/pyramid along the z axis
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Sop Ashdene
Registered User
Join date: 14 Oct 2008
Posts: 4
10-26-2008 12:02
ohh thanks alot!
ive done it. =D
Oddr Stenvaag
Registered User
Join date: 12 Dec 2007
Posts: 5
Great script this is what I need
10-28-2008 21:55
the SetPrimitiveParams numbers look confusing where would I find various shape values
in particular a cylinder that would open after its flattened? I intend to link two such prims
to a new spaceship (one square one flat cylinder)
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
10-28-2008 22:27
From: Oddr Stenvaag
the SetPrimitiveParams numbers look confusing where would I find various shape values
in particular a cylinder that would open after its flattened? I intend to link two such prims
to a new spaceship (one square one flat cylinder)


Change PRIM_TYPE_BOX to PRIM_TYPE_CYLINDER and go from there.
_____________________
SCOPE Homes, Bangu
-----------------------------------------------------------------
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-29-2008 03:16
From: Oddr Stenvaag
the SetPrimitiveParams numbers look confusing where would I find various shape values
in particular a cylinder that would open after its flattened? I intend to link two such prims
to a new spaceship (one square one flat cylinder)
It would probably be worth taking a look at http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSetPrimitiveParams for details of all the different numbers and settings and what they do.

There's also a very useful function in the library, http://www.lslwiki.net/lslwiki/wakka.php?wakka=LibraryDumpPrimParameters, which gives you a list of (most of) the numbers that describe a particular prim.

I sometimes find it easiest to cut a prim by hand the way I want it and then use this function to extract the numbers I want to use in llSetPrimitiveParams. If you're doing this, though, you need to take care that you don't copy over numbers and settings you don't need, or you risk finding yourself changing the scripted prim in ways you don't want, too. So I find it safest to use that function with a copy of the wiki page open at the same time, so I can see exactly what I'm doing.
1 2 3