|
Cyrus Odets
Registered User
Join date: 5 Oct 2005
Posts: 51
|
05-02-2006 18:47
If you had an object...I'll use a Star Wars 'light sabre' for example.
You've got a 'handle' prim....and you have a little 'blade' prim that you have scaled all the way down to the minimum (.01) so that when the light sabre is 'off'...its just a little disc. Now when you turn the light sabre 'on'...you want to 'scale' that disc to go from minimum size (.10) to 1 meter long.
I notice in the regular 'edit' pane...when you select to 'stretch' a prim....you can select NOT to have it stretch both sides...so that you can just resize the prim in only ONE direction.
Does anyone know if this is possible with llScale in a script? So far....my experiments with llScale always force the prim to resize in two directions at once.
btw...I'm not actually making a 'light sabre' here....the 'light sabre' was the best example I could think of to illustrate my question.
Thanks!
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
05-02-2006 19:01
AFAIK, no. To get that effect, you'll have to scale it and re-position it (I think you need to move the prim by 1/2 the size change, in the direction of the size change). Use llSetPrimitiveParams to do both in one step, otherwise it'll look odd (it'll change size first, then move 0.2s later, or vice versa), because IIRC both the scale and the set position functions have built in delays.
|
|
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
|
05-02-2006 19:30
This is probably not what you want, but I'll suggest it just in case. Is there a reason why you want to scale it and not just hide it altogether? That's really easy to do with llSetAlpha(0.0, ALL_SIDES) and llSetAlpha(1.0, ALL_SIDES) to restore it.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-03-2006 00:03
It is possible to do this. Make a sphere, set the dimple to 0.50 -> 1.00 Then change the prim to a cylinder. Then when you use llSetScale it will scale like you want, but you must remember to double the Z size.
(this is basic prim torture)
_____________________
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
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
05-03-2006 01:06
Alternatively you can use llSetPrimitiveParams and change the position and scale at the same time. I think the alpha method is probably safest though - scaling operations in child prims of linksets seem to have a habit of randomly crashing the scripts in my experience.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-03-2006 01:19
From: Seifert Surface scaling operations in child prims of linksets seem to have a habit of randomly crashing the scripts in my experience. I have not seen this, for the last 5 weeks I've been running scripts that do this extensively and not yet had a script crash because of it. I have had stack heap collisions for other reasons though, but not in the scripts doing the moving.
_____________________
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
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
05-03-2006 01:53
Hmm... well I got out my examples of things that used to break and recompiled everything.
One of them I can't seem to get it to break, the other I can. 2 linked prims, one scales and moves using llSetPrimitiveParams, after 10 or 20 moves the scaling stops working, and only the movement works.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|