Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "zcommon.acs"
- script 1 (void)
- {
- int z = GetActorZ(0)+24.0;
- int vz = 2.0;
- int pitch = GetActorPitch(0);
- // -0.9 to 1.26
- pitch += 0.9;
- pitch = 1.1-pitch;
- pitch *= 8;
- vz += FixedMul(6.0, pitch);
- int dx = cos(GetActorAngle(0));
- int dy = sin(GetActorAngle(0));
- //SpawnSpotFacing("Rocket", 0, 1);
- Spawn("Rocket", GetActorX(0)+dx*48, GetActorY(0)+dy*48, z, 1, GetActorAngle(0));
- SetActorAngle(1, GetActorAngle(0));
- while (true)
- {
- z += vz;
- vz -= 0.9;
- if (vz < -8.0) vz = -8.0;
- if (!SetActorPosition(1, GetActorX(1)+dx*10, GetActorY(1)+dy*10, z, false))
- {
- SetActorState(1, "Death", true);
- break;
- }
- if (!ThingCountName("Rocket", 1))
- break;
- Delay(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement