Guest User

Untitled

a guest
Mar 6th, 2015
614
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "zcommon.acs"
  2.  
  3. script 1 (void)
  4. {
  5. int z = GetActorZ(0)+24.0;
  6. int vz = 2.0;
  7.  
  8. int pitch = GetActorPitch(0);
  9. // -0.9 to 1.26
  10. pitch += 0.9;
  11. pitch = 1.1-pitch;
  12. pitch *= 8;
  13.  
  14. vz += FixedMul(6.0, pitch);
  15.  
  16. int dx = cos(GetActorAngle(0));
  17. int dy = sin(GetActorAngle(0));
  18.  
  19. //SpawnSpotFacing("Rocket", 0, 1);
  20. Spawn("Rocket", GetActorX(0)+dx*48, GetActorY(0)+dy*48, z, 1, GetActorAngle(0));
  21. SetActorAngle(1, GetActorAngle(0));
  22. while (true)
  23. {
  24. z += vz;
  25. vz -= 0.9;
  26. if (vz < -8.0) vz = -8.0;
  27.  
  28. if (!SetActorPosition(1, GetActorX(1)+dx*10, GetActorY(1)+dy*10, z, false))
  29. {
  30. SetActorState(1, "Death", true);
  31. break;
  32. }
  33.  
  34. if (!ThingCountName("Rocket", 1))
  35. break;
  36.  
  37. Delay(1);
  38. }
  39.  
  40. }
RAW Paste Data