![](https://blogimg.goo.ne.jp/user_image/37/d9/33eafd65b8352fde5eb8d4f8919e042e.jpg)
![](https://blogimg.goo.ne.jp/img_emoji/star.gif)
![](https://blogimg.goo.ne.jp/img_emoji/star.gif)
![](https://blogimg.goo.ne.jp/img_emoji/dog_happy.gif)
お星様の中のスクリプトは、以前も書いたけどLSLの解説ページのサンプルをそのまま使ってるんだー。
なーんて言ってもパーティクルを出す関数って1つだけだから、実はサンプルスクリプトだって、単に受け渡すパラメータが分かりやすいようにグローバル変数として定義してるだけなの
![](https://blogimg.goo.ne.jp/img_emoji/face_nika.gif)
自分で作ったのって、クリックするたびに変数の中身をちょっと変えてパーティクルの関数を呼ぶところだけだよ?
変数の数字をいじって動かしてみてれば、きっと何かが見えてくるんじゃないかな
![](https://blogimg.goo.ne.jp/img_emoji/hiyo_do.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_down.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_down.gif)
![](https://blog.goo.ne.jp/img_emoji/arrow_down.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_down.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_down.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_down.gif)
integer TOUCHED = 0; //touch counter
// 1: star geyser
// 2: star brilliance
// 3: meteor
integer PART_BOUNCE_MASK= 0;//PSYS_PART_BOUNCE_MASK;
integer PART_EMISSIVE_MASK=PSYS_PART_EMISSIVE_MASK;
integer PART_FOLLOW_SRC_MASK=0; // PSYS_PART_FOLLOW_SRC_MASK
integer PART_FOLLOW_VELOCITY_MASK=0; // PSYS_PART_FOLLOW_VELOCITY_MASK
integer PART_INTERP_COLOR_MASK=PSYS_PART_INTERP_COLOR_MASK ;
integer PART_INTERP_SCALE_MASK=PSYS_PART_INTERP_SCALE_MASK;
integer PART_TARGET_LINEAR_MASK=0; // PSYS_PART_TARGET_LINEAR_MASK
integer PART_TARGET_POS_MASK=0; // PSYS_PART_TARGET_POS_MASK
integer PART_WIND_MASK=0; //PSYS_PART_WIND_MASK ;
integer PART_PATTERN = PSYS_SRC_PATTERN_EXPLODE ;
//integer PART_PATTERN = PSYS_SRC_PATTERN_ANGLE;
//integer PART_PATTERN = PSYS_SRC_PATTERN_ANGLE_CONE;
//integer PART_PATTERN = PSYS_SRC_PATTERN_DROP;
float PART_START_ALPHA = 1.0;
float PART_END_ALPHA = 0.0;
vector PART_START_COLOR = <1.0,1.0,1.0>;
vector PART_END_COLOR = <0.6,0.6,0.6>;
vector PART_START_SCALE = <0.32,0.32,0.0>;
vector PART_END_SCALE = <1.0,1.0,0.0>;
float SRC_MAX_AGE = 0.0;
float PART_MAX_AGE = 3.5 ;
vector PART_ACCEL = <0.0,1.0,-1.0>;
float PART_ANGLE_BEGIN = 0; //PI ;
float PART_ANGLE_END = 2; //PI ;
integer PART_BURST_COUNT = 4 ;
float PART_BURST_RADIUS = 10.0 ;
float PART_BURST_RATE = 0.0 ;
float PART_BURST_SPEED_MIN = 0.0 ;
float PART_BURST_SPEED_MAX = 0.0 ;
vector PART_OMEGA = <0.0,0.0,15.0> ;
string PART_TEXTURE = "star_particle" ;
key PART_TARGET_KEY = NULL_KEY ;
SetParticle(integer on){
if (on){
llParticleSystem(
[ PSYS_PART_FLAGS , PART_BOUNCE_MASK |
PART_EMISSIVE_MASK |
PART_FOLLOW_SRC_MASK |
PART_FOLLOW_VELOCITY_MASK |
PART_INTERP_COLOR_MASK |
PART_INTERP_SCALE_MASK |
PART_TARGET_LINEAR_MASK |
PART_TARGET_POS_MASK |
PART_WIND_MASK
,PSYS_SRC_PATTERN, PART_PATTERN
,PSYS_PART_START_ALPHA, PART_START_ALPHA
,PSYS_PART_END_ALPHA, PART_END_ALPHA
,PSYS_PART_START_COLOR, PART_START_COLOR
,PSYS_PART_END_COLOR, PART_END_COLOR
,PSYS_PART_START_SCALE, PART_START_SCALE
,PSYS_PART_END_SCALE, PART_END_SCALE
,PSYS_SRC_MAX_AGE, SRC_MAX_AGE
,PSYS_PART_MAX_AGE, PART_MAX_AGE
,PSYS_SRC_ACCEL, PART_ACCEL
,PSYS_SRC_ANGLE_BEGIN, PART_ANGLE_BEGIN
,PSYS_SRC_ANGLE_END, PART_ANGLE_END
,PSYS_SRC_BURST_PART_COUNT, PART_BURST_COUNT
,PSYS_SRC_BURST_RADIUS, PART_BURST_RADIUS
,PSYS_SRC_BURST_RATE, PART_BURST_RATE
,PSYS_SRC_BURST_SPEED_MIN, PART_BURST_SPEED_MIN
,PSYS_SRC_BURST_SPEED_MAX, PART_BURST_SPEED_MAX
,PSYS_SRC_OMEGA, PART_OMEGA
,PSYS_SRC_TEXTURE, PART_TEXTURE
,PSYS_SRC_TARGET_KEY, PART_TARGET_KEY
]);
}else{
llParticleSystem([]);
}
}
default {
state_entry(){
}
touch_start(integer detected) {
if (TOUCHED == 0){
TOUCHED = 1; //star geyser
PART_PATTERN = PSYS_SRC_PATTERN_ANGLE; //oogigata
PART_MAX_AGE = 1.5 ; //sukosi mijikaku
PART_ACCEL = <0.0,0.0,-5.0>; //hayaku rakka suru houkou
PART_BURST_COUNT = 4 ; //sukosi oomeni
PART_BURST_RADIUS = 0.0 ; //han i nasi
PART_BURST_RATE = 0.1 ; //subayaku tobidasu
PART_BURST_SPEED_MIN = 10.0 ;//pyu-n to subayai
PART_BURST_SPEED_MAX = 0.3 ; //poyo-n to osoi
SetParticle(TRUE);
} else if (TOUCHED == 1){
TOUCHED = 2; //star brilliance
PART_PATTERN = PSYS_SRC_PATTERN_EXPLODE ; //bakuhatu
PART_MAX_AGE = 3.5 ; //sukosi nagaku
PART_ACCEL = <0.0,0.0,0.0>; //sonoba de teisi
PART_BURST_COUNT = 3 ; //sukosi oomeni
PART_BURST_RADIUS = 8.0 ; //han i hiroku
PART_BURST_RATE = 0.0 ; //renzoku de takusan
PART_BURST_SPEED_MIN = 0.0 ; //speed nasi
PART_BURST_SPEED_MAX = 0.0 ; //speed nasi
SetParticle(TRUE);
} else if (TOUCHED == 2){
TOUCHED = 3; //meteor
PART_PATTERN = PSYS_SRC_PATTERN_EXPLODE ; //bakuhatu
PART_MAX_AGE = 3.5 ; //sukosi nagaku
PART_ACCEL = <0.0,1.0,-1.0>; //rakka suru houkou
PART_BURST_COUNT = 3 ; //sukosi oomeni
PART_BURST_RADIUS = 8.0 ; //han i hiroku
PART_BURST_RATE = 0.0 ; //renzoku de takusan
PART_BURST_SPEED_MIN = 0.0 ; //speed nasi
PART_BURST_SPEED_MAX = 0.0 ; //speed nasi
SetParticle(TRUE);
} else {
TOUCHED = 0;
SetParticle(FALSE);
}
}
}
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)
![](https://blogimg.goo.ne.jp/img_emoji/arrow_t.gif)