Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. Information about object: objBugs
  2. Sprite:
  3. Solid: false
  4. Visible: true
  5. Depth: 5000
  6. Persistent: false
  7. Parent:
  8. Children:
  9. Mask:
  10.  
  11. No Physics Object
  12. Create Event:
  13.  
  14. execute code:
  15.  
  16.  
  17.  
  18. SetDense = 0;
  19. // Particles
  20. partBugs_sys = part_system_create();
  21. part_system_depth(partBugs_sys,500);
  22. // Bugs Particle
  23. partBugs = part_type_create();
  24. part_type_sprite(partBugs,sprBug,0,0,1);
  25. part_type_alpha3(partBugs,0,0.6,0);
  26. part_type_orientation(partBugs,-100,-80,0.001,0.0,1);
  27. part_type_direction(partBugs,0,360,0,1);
  28. part_type_speed(partBugs,0.2,0.3,0,0.00001);
  29. part_type_color_mix(partBugs,c_black, c_gray);
  30. part_type_life(partBugs,3 * room_speed ,5 * room_speed );
  31. part_type_size(partBugs,0.3 ,0.5,0,0);
  32. //part_type_speed(partBugs,1 * Size,3 * Size,0,0);
  33.  
  34.  
  35.  
  36. // Particle Emitter
  37. partBugs_emit = part_emitter_create(partBugs_sys);
  38. part_emitter_region(partBugs_sys,partBugs_emit,0, room_width,0,room_height,ps_shape_rectangle,ps_distr_linear);
  39. part_emitter_stream(partBugs_sys, partBugs_emit,partBugs,-2);
  40.  
  41. repeat(room_speed * 7)
  42. {
  43. part_system_update(partBugs_sys);
  44. }
  45.  
  46.  
  47. Destroy Event:
  48.  
  49. execute code:
  50.  
  51. part_system_clear(partBugs_sys);
  52. part_type_destroy(partBugs);
  53. part_emitter_destroy(partBugs_sys,partBugs_emit);
  54. part_system_destroy(partBugs_sys);
  55.  
  56. Step Event:
  57.  
  58. execute code:
  59.  
  60. if SetDense <> 0
  61. {
  62. part_emitter_stream(partBugs_sys, partBugs_emit,partBugs,SetDense);
  63. repeat(room_speed * 7)
  64. {
  65. part_system_update(partBugs_sys);
  66. }
  67. SetDense = 0;
  68. }
  69.  
  70. Other Event: Room End:
  71.  
  72. execute code:
  73.  
  74. instance_destroy();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement