PRIM GLOW/ja - Second Life Wiki

PRIM GLOW/ja

From Second Life Wiki

メインページ > PRIM GLOW > PRIM GLOW/ja
Jump to: navigation, search

Contents

解説

定数: integer PRIM_GLOW = 25;

integerの定数PRIM_GLOWは25の値をもちます。

PRIM_GLOWは側面のグローステータスを取得あるいは設定するのに用いられます。コンパイラが命名された定数を受け付けない場合は、25の数値を使います。

llSetPrimitiveParams

[ PRIM_GLOW, integer face, float intensity ]
• integer face の番号あるいはALL_SIDES
• float intensity 0.0から1.0の範囲

llSetPrimitiveParamsllSetLinkPrimitiveParamsを実行する時に用いられます。

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_GLOW, integer face ]);

list [ float intensity ]を返します。

• integer face の番号あるいはALL_SIDES

• float intensity 0.0から1.0の範囲

注意:

  • faceの示す面が存在しない場合、[ 0.0 ]を返します。

関連項目

定数

• integer CHANGED_TEXTURE

関数

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

イベント

•  changed

//Each time the prim is touched, the intensity of the glow is increased (until it maxes out and cycles back to zero).
integer steps = 10;
integer counter = 0;
 
default 
{
    touch_start(integer total_number) 
    { 
        llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES,  counter / (steps - 1.0) ]);
        counter = (counter + 1) % steps;
    } 
}
//Each time the prim is touched, the intensity of the glow is decreased (until it hits zero and cycles back to one).
integer steps = 10;
integer counter = 0;
 
default 
{
    touch_start(integer total_number) 
    { 
        llSetPrimitiveParams( [ PRIM_GLOW, ALL_SIDES,  counter / (steps - 1.0) ]);
        counter = (counter + steps - 1) % steps;
    } 
}