Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

scale one prim in an object

Kim Ludd
Registered User
Join date: 6 Jun 2005
Posts: 17
01-06-2006 07:03
hi, I have an object that is moving (not a vehicle) ... I want one prim of the object to scale while moving along with the whole object.

My guess is that I need to use llGetLinkNumber() and ||GetScale and ||SetScale, but I'm not sure how to work it into my code ... please help :)

How do I hone in on just one prim (tap into the link order/link number??)?

Here is my code block (I also don't know how to post a block of code in the forums so that it appears in a scrolling space) :

default
{
state_entry()
{
// get the start position - vector and rotation - in order to reset the object at the end
gStartPos = llGetPos();
gStartRot = llGetRot();
// set goal rotation
rot = llEuler2Rot(<0, PI/20.0, 0>;);
// rotRope = llEuler2Rot(<0, PI/37.0, 0>;);
gAdmin = llGetOwner();
llListen(gDirectChannel, "", NULL_KEY, "";);
}

listen(integer channel, string name, key id, string msg)
{
if ( msg == gGoMsg )
{
integer i;

//this is the X movement 5m

for( i = 0; i < 50; i++)
{
llSetPos(llGetLocalPos() - <0.1, 0, 0>;);

// during this span, i need one prim to scale, so it looks like it is filling up a space.
// if (llGetLinkNumber() == 2);
{
// ||GetScale ||SetScale ???
}
}
...


thanks!!
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
01-06-2006 10:18
is it physical? I don't believe llSetScale works in physical objects.
_____________________
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
01-06-2006 14:52
I don't know if this is part of the issue or not, but is there a reason you are writing "||SetScale" rather than "llSetScale"? (The pipe character instead of lower case L)
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
01-06-2006 16:02
also... most of the code you have show here, handling the movement, will go in the root prim of your object. The llSetScale will need to be in script inside just the prim that is going to be resizing.
Kim Ludd
Registered User
Join date: 6 Jun 2005
Posts: 17
01-09-2006 06:30
From: Seifert Surface
I don't know if this is part of the issue or not, but is there a reason you are writing "||SetScale" rather than "llSetScale"? (The pipe character instead of lower case L)



duh, no, just tired i guess :) and so new to scripting, sometimes i slip in the number "1" instead of lower case L ... it never seems to work *blushing*