Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. {
  2. if(readyToShoot == true && ammo >0 and lobbed<maxAmmo) {
  3. var oid, newx, newy;
  4. playsound(x,y,MinegunSnd);
  5. ammo -= 1;
  6.  
  7. oid = instance_create(x+lengthdir_x(10,owner.aimDirection),y+lengthdir_y(10,owner.aimDirection), Mine);
  8.  
  9. oid.direction=owner.aimDirection;
  10. oid.speed=12;
  11. oid.owner=owner;
  12. oid.ownerPlayer=ownerPlayer;
  13. oid.team=owner.team;
  14. oid.weapon=WEAPON_MINEGUN;
  15. lobbed += 1;
  16. justShot=true;
  17. readyToShoot = false;
  18. alarm[0] = reloadTime;
  19. alarm[5] = 0;
  20. }
  21. }
  22.  
  23.  
  24.  
  25.  
  26.  
  27. And the bit in the mines causing self destroy:
  28.  
  29.  
  30. if explosionDamage < 50 explosionDamage += 1;
  31.  
  32. if(not stickied) {
  33. vspeed+=0.2;
  34. vspeed=min(vspeed,8);
  35. }
  36.  
  37. if ownerPlayer == other.ownerPlayer instance_destroy();
  38.  
  39.  
  40.  
  41. Only thing changed with mines was tthe destroy event itself:
  42.  
  43. if global.myself.object.currentWeapon.object_index = Minegun owner.currentWeapon.lobbed -= 1;
  44. else global.myself.object.lobbed -= 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement