Advertisement
Guest User

GlowTail

a guest
Nov 2nd, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. task Glow {
  2. //Current task for the "leader" Bullet
  3. loop(4){
  4. let randir = rand(-0.5,0.5);
  5. Light = CreateShotB2(BossX,BossY-45,randir,-3,0,0.05,0,2,308,15);
  6. Glowtrail(Light); // Pass the bullet data from the "Light" variable to task Glowtrail
  7. wait(53);
  8. }
  9. }
  10.  
  11. task Glowtrail(obj) { // Create a new variable name "obj" and let it store bullet data from the passed variable
  12. // in this case, it's the "Light" Variable
  13. //Current task for the disappearing bullet trail following the leading bullet
  14. while(!Obj_IsDeleted(obj)) // this means "while the "obj" variables still exist, do something in the next bracket
  15. { // Otherwise,skip every thing in the next bracket
  16. let LgtX = ObjMove_GetX(obj);
  17. let LgtY = ObjMove_GetY(obj);
  18. let MiniLgt = CreateShotA2(LgtX,LgtY,0,rand(0,360),0.001,0.1,74,11); // you need to create a new variable here
  19. wait(10);
  20. ObjShot_FadeDelete(MiniLgt);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement