• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Particle Problems(CLOSED)

Null-Z

Member
I'm trying to create an "after image" effect for a projectile object.
the problem is the projectile itself changes it's angle on creation to point toward the player object. I've tried
Code:
///particle system
part1_sys = part_system_create();

//particles
part1 = part_type_create()
part_type_sprite(part1,spr_BJewlFde,false,false,false);
part_type_size(part1,0.001,1,0,0,);
part_type_color1(part1,c_black);
part_type_alpha2(part1, 0.5, 0);
part_type_life(part1,20,20);

//particle emiter
part1_emit = part_emitter_create(part1_sys);
part_emitter_region(part1_sys,part1_emit,x-40,x+40,y-40,y+40,ps_shape_ellipse,ps_distr_gaussian);
Code:
part_type_orientation(part1,point_direction(x,y,obj_ParticleExper.x,obj_ParticleExper.y), point_direction(x,y,obj_ParticleExper.x,obj_ParticleExper.y), false, false, false);

part_emitter_burst(part1_sys,part1_emit,part1,5);
part_emitter_region(part1, part1_emit, obj_ParticleExper.x , obj_ParticleExper.x, obj_ParticleExper.y, obj_ParticleExper.y,
 ps_shape_line, ps_distr_gaussian );
but that does nothing.
(obj_ParticleExper is the object I want the particle to match angle orientation.)

what am I missing to make this work?
 
Last edited:

samspade

Member
You'd need to post all of your particle code which would include how it is set up and what events the code is in to get an answer on this. If I had to guess, I'd say it is because you only set the orientation once instead up updating it as needed.
 

tagwolf

Member
Update the orientation of the emitter in the step (or better yet, an alarm) event too based on the bullet's rotation.
 

NightFrost

Member
Yeah, if you run that in create, then the orientation will be set once, according to state of affairs when the create runs. If you need to update particle orienation, then you need to run the command again (typically in Step event).
 

Null-Z

Member
well...
dropping part_type_orientation into the step event doesn't work.
am I missing something?
 

Null-Z

Member
Bump, I re-read through the particle section of the manual but couldn't find anything that seemed helpful.
 
Top