Chris Smith
Member
Greetings game makers!
At the moment I am working on an intro cut scene for a game I'm working on and it involved a rocket flying in many directions across the screen. I created a fire for the rear of the rocket, by using a particle emitter. Both the rocket and the fire, here, will only be used for the intro sequence, so I put the particle emitter in the rocket object, and it works great, except I don't know how to get the fire to stay in its place on the rear of the rocket. I'm quite new to GML still, so I'm struggling to figure out exactly how to do this.
For testing I just created a room and put control code on the rocket to move it around. I've attached a short video that will show better than I can explain.
This is the code being used:
obj_introship STEP
Thanks for your time!
At the moment I am working on an intro cut scene for a game I'm working on and it involved a rocket flying in many directions across the screen. I created a fire for the rear of the rocket, by using a particle emitter. Both the rocket and the fire, here, will only be used for the intro sequence, so I put the particle emitter in the rocket object, and it works great, except I don't know how to get the fire to stay in its place on the rear of the rocket. I'm quite new to GML still, so I'm struggling to figure out exactly how to do this.
For testing I just created a room and put control code on the rocket to move it around. I've attached a short video that will show better than I can explain.
This is the code being used:
obj_introship CREATE
//Fire Particles
partfire = part_type_create();
part_type_sprite(partfire,spr_shipfire,0,0,1)
part_type_size(partfire,1,2,0,0);
part_type_colour3(partfire,c_yellow,c_orange,c_red);
part_type_alpha3(partfire,1,1,0);
part_type_speed(partfire,4,20,0,0);
part_type_direction(partfire,85,95,0,10)
part_type_orientation(partfire,0,359,0,0,0);
part_type_blend(partfire,1);
part_type_life(partfire,8,20);
//Particle Emitter
partfire_emitter = part_emitter_create(partfire_system);
part_emitter_region(partfire_system,partfire_emitter,x-100,x+100,y-20,y+20,ps_shape_ellipse,ps_distr_linear);
//Particle System
partfire_system = part_system_create();//Fire Particles
partfire = part_type_create();
part_type_sprite(partfire,spr_shipfire,0,0,1)
part_type_size(partfire,1,2,0,0);
part_type_colour3(partfire,c_yellow,c_orange,c_red);
part_type_alpha3(partfire,1,1,0);
part_type_speed(partfire,4,20,0,0);
part_type_direction(partfire,85,95,0,10)
part_type_orientation(partfire,0,359,0,0,0);
part_type_blend(partfire,1);
part_type_life(partfire,8,20);
//Particle Emitter
partfire_emitter = part_emitter_create(partfire_system);
part_emitter_region(partfire_system,partfire_emitter,x-100,x+100,y-20,y+20,ps_shape_ellipse,ps_distr_linear);
obj_introship STEP
///FIRE
part_emitter_burst(partfire_system,partfire_emitter,partfire,10)
part_emitter_region(partfire_system,partfire_emitter,x-160,x-96,y-32,y+32,ps_shape_ellipse,ps_distr_linear);
part_type_size(partfire,.7,1.3,0,0);
part_type_direction(partfire,(image_angle-20)+180,(image_angle+20)+180,0,10)
part_type_orientation(partfire,0,359,0,0,1);
part_emitter_burst(partfire_system,partfire_emitter,partfire,10)
part_emitter_region(partfire_system,partfire_emitter,x-160,x-96,y-32,y+32,ps_shape_ellipse,ps_distr_linear);
part_type_size(partfire,.7,1.3,0,0);
part_type_direction(partfire,(image_angle-20)+180,(image_angle+20)+180,0,10)
part_type_orientation(partfire,0,359,0,0,1);
Thanks for your time!