Thing_ProjectileGravity — shoots a gravity-affected projectile from a map spot.
Thing_ProjectileGravity (tid, type, angle, speed, vspeed);
Thing_ProjectileGravity ( tid, // Map spot(s) to spawn the new thing at type, // The type of thing to spawn angle, // Byte angle for the new thing to face speed, // Speed of the projectile in the x-y plane vspeed // Vertical speed of the projectile (up is positive) );
This special works almost equally well whether you use it in a script or on a line. The only difference is that when used on a line, you cannot specify negative vspeeds, so you will be unable to shoot a projectile down unless you spawn it from inside a script. If you use it in a script, it is strongly recommended that you specify type using the names defined in zdefs.acs instead of by using the corresponding number. This is so that your script will be more readable, although the special will work equally well whether you use the names or not.
Although tid is often the TID of a map spot, it can refer to any thing on the map—not just map spots.
Anything spawned with this special will be subjected to low gravity, even if it is normally subjected to no gravity or normal gravity.
If there is no room for a projectile at the location where it is to spawn, then it will not spawn at all. The only way to detect this is to use ThingCount before and after Thing_ProjectileGravity and compare the two results to see if the count increased. In most cases, you should not actually need to know this.
Although this special is traditionally used to spawn missiles, it can be used to spawn anything that Thing_Spawn is capable of spawning. The box at the back of Heresiarch's Semetary in Hexen (MAP27) uses this special to spawn random items and monsters.
Spawn an imp fire ball at mapspot 1, moving straight east:
Thing_SpawnGravity (1, T_IMPFIREBALL, 0, 64, 0);
Spawn a rocket at mapspot 1, moving north and slightly upward:
Thing_SpawnGravity (1, T_ROCKET, 64, 64, 8);
Hexen
Thing_Projectile | Thing_Spawn | Thing_SpawnFacing | Thing_SpawnNoFog