SpawnProjectile
From ZDoom Wiki
void SpawnProjectile (int tid, string type, int angle, int speed, int vspeed, int gravity, int newtid)
Usage
SpawnProjectile is similar to the Thing_Projectile, Thing_ProjectileGravity, and Thing_Projectile2 specials, but instead of using a spawn ID you pass an actor's class name.
Examples
This script will fire a random projectile at a random angle from a thing with tid 1 as specified by the projectile array at a horizontal speed of 20.
str projectile[3] = {"DoomImpBall", "CacodemonBall", "BaronBall"};
script 1 (void)
{
SpawnProjectile(1, projectile[random(0, 2)], random(0, 255), 20, 0, 0, 0);
}
| ACS spawn functions | |
|---|---|
| Spawn | SpawnForced |
| SpawnSpot | SpawnSpotForced |
| SpawnSpotFacing | SpawnSpotFacingForced |
| SpawnProjectile | |