Guest User

Game Maker Particle codes

a guest
Jun 21st, 2012
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. Codes used in this tutorial:
  2.  
  3. Obj_blood:
  4.  
  5. motion_set(random(100),random(10));//sets to move in any were in a 360 degree movement and speed to random out of 15
  6. gravity_direction=270;//sets the direction gravity pulls
  7. gravity=0.5;//sets ammount of gravity (i dont recomend over 0.5)
  8. alarm[0]=300//sets the timer for when to start to remove blood
  9. fade=false;//tells not to fade yet
  10.  
  11. fade=true//this tell to fade the object away
  12.  
  13. if fade=true
  14. {
  15. image_alpha-=0.02; // Sets the image alpha relative to 0.01
  16. }
  17.  
  18. if image_alpha<=0 // once the object is completely transparent it'll be destroyed
  19. {
  20. instance_destroy();
  21. }
  22.  
  23. speed = 0
  24. fade = true
  25.  
  26. instance_destroy()
  27.  
  28. obj_test:
  29.  
  30. instance_create(x,y,obj_blood);
  31. repeat(10)
  32. {
  33. instance_create(x,y,obj_blood);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment