0 registered members (),
730
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Set Particle angles
[Re: Reconnoiter]
#462093
09/08/16 15:38
09/08/16 15:38
|
Joined: Jun 2010
Posts: 212
tagimbul
Member
|
Member
Joined: Jun 2010
Posts: 212
|
it possible you can write in the particle event my.pan +=1;
// include lib:
#include <acknex.h>
#include <default.c>
//#include <mtlFX.c>
#include <particles.c>
function p_rot_event(ENTITY* p)
{
var dreahspeed = 0.1;
my.pan += dreahspeed;
my.tilt += dreahspeed;
my.roll += dreahspeed;
}
function particle_event_combo()
{
p_fade_sprite(me);
p_rot_event(me);
}
// sprite-emulated particle function
function p_sprite_shine(ENTITY* sprite)
{
VECTOR vTemp;
vec_randomize(vTemp,0.4);
vec_add(sprite._VEL_X,vTemp);
set(sprite, BRIGHT | TRANSLUCENT);
sprite.blue = random(100);
sprite.green = random(1);
sprite.red = random(255);
sprite.alpha = 50;
sprite._SIZE = 2.5;
sprite._FADE = 2.5; // fade factor
my.pan = random(360);
my.tilt = random(180)-90;
my.roll = random(360);
sprite.event = particle_event_combo;
}
action act_particle_sog()
{
while(1)
{
effect_sprite("shine.png",p_sprite_shine,maxv(1,20*time_step),my.x,vector(0,0,2));
wait(40);
}
}
function main ()
{
video_window(NULL, NULL, NULL, "Flare Expansion");
level_load(NULL);
ENTITY* particle_sog = ent_create(NULL,vector(0,0,0),act_particle_sog);
sky_color.red = 0;
sky_color.green = 0;
sky_color.blue = 0;
camera.x = -344;
}
change flare2.png with a file on you computer. you need a png with alpha channel
Last edited by tagimbul; 09/08/16 16:00.
|
|
|
Re: Set Particle angles
[Re: tagimbul]
#462098
09/09/16 09:12
09/09/16 09:12
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
it possible you can write in the particle event my.pan +=1; In your example you aren't using particles, but sprites (entities). Maybe you aready knew this, I just wanted to make it clear. Greets!
|
|
|
|