Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///STEP EVENT FOR ENEMY THAT CREATES PARTICLE OBJECT:
- if Brain.active_character = char_id and Brain.GameState = GameStates.ability_2 {
- if sprite_index = ani_release_and_notch {
- if image_index >= 4 and image_index < 5 {
- image_index = 5;
- image_speed = .125;
- var creator = instance_create(x,y, Power_shot)
- if Brain.stats[char_id, 10] > x_pos {
- p_dir = "right"
- }
- else if Brain.stats[char_id, 10] < x_pos {
- p_dir = "left"
- }
- with (creator) {
- host_x_pos = other.x_pos;
- host_y_pos = other.y_pos;
- p_dir = other.p_dir
- host_id = other.char_id
- }
- }
- if image_index >= 21 {
- sprite_index = ani_idle;
- image_index = 0;
- image_speed = .125;
- }
- }
- }
- ///CREATE EVENT FOR PARTICLE OBJECT/PROJECTILE (CREATES THE PARTICLE SYSTEM)
- count = 0
- count2 = false;
- //Creating Particle System
- PowershotPartSystem = part_system_create();
- part_system_depth(PowershotPartSystem, 0);
- //Creating Particle Types
- Powershot = part_type_create();
- part_type_sprite(Powershot, spr_dot, 0, 0, 0);
- part_type_size(Powershot, 1, 1, 0, 0);
- part_type_scale(Powershot, 1, 1);
- part_type_orientation(Powershot, 0, 0, 0, 0, 0);
- part_type_color3(Powershot, 16580608, 8404992, 16566925);
- part_type_alpha3(Powershot, 1, 0.70, 0.24);
- part_type_blend(Powershot, 1);
- part_type_life(Powershot, 15, 22);
- part_type_speed(Powershot, 1, 3.5, 0, 0);
- part_type_direction(Powershot, 0, 360, 0, 15);
- part_type_gravity(Powershot, 0, 90);
- //Creating Emitters
- PowershotEmitter = part_emitter_create(PowershotPartSystem);
- //Adjusting Emitter positions. Starting Emitter Streams or Bursts.
- xp = x;
- yp = y+20;
- part_emitter_region(PowershotPartSystem, PowershotEmitter, xp, xp, yp, yp, ps_shape_rectangle, ps_distr_linear);
- part_emitter_stream(PowershotPartSystem, PowershotEmitter, Powershot, 10);
- ///STEP EVENT FOR PARTICLE OBJECT/PROJECTILE
- if Brain.stats[host_id, 1] = 0{part_type_color3(Powershot, 16580608, 8404992, 16566925);}
- else if Brain.stats[host_id, 1] = 1 {part_type_color3(Powershot, 8421631, 255, 128);}
- if !count2 {
- if p_dir == "right"{
- xp+=25/3
- yp-=5/3
- image_xscale = 1
- }
- if p_dir == "left"{
- xp-=25/3
- yp+=5/3
- image_xscale = -1
- }
- part_system_depth(PowershotPartSystem, -y-100)
- part_emitter_region(PowershotPartSystem, PowershotEmitter, xp-5, xp+5, yp-1, yp+1, ps_shape_ellipse, ps_distr_linear);
- Camera.x = xp
- Camera.y = yp
- depth = -yp-104
- if count = 3 {
- count = 0
- if p_dir == "right" {
- host_x_pos = host_x_pos + 1
- if (host_x_pos >= Brain.field_width) {
- part_emitter_stream(PowershotPartSystem, PowershotEmitter, Powershot, 0);
- count2 = true
- }
- if Brain.occupied[host_x_pos, host_y_pos] != "none" {
- Brain.damage[host_x_pos, host_y_pos] = floor(random_range(50,75.99))
- }
- }
- else if p_dir == "left" {
- host_x_pos = host_x_pos - 1
- if host_x_pos <= 0 {
- part_emitter_stream(PowershotPartSystem, PowershotEmitter, Powershot, 0);
- count2 = true
- }
- if Brain.occupied[host_x_pos, host_y_pos] != "none" {
- Brain.damage[host_x_pos, host_y_pos] = floor(random_range(50,75.99))
- }
- }
- }
- count++
- }
- if count2 {
- Camera.x = xp
- Camera.y = yp
- depth = -yp-104
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement