Thing_ProjectileAimed

From ZDoom Wiki

Jump to: navigation, search

178:Thing_ProjectileAimed (tid, type, speed, target, newtid)

tid: Thing ID of the map spot to spawn the projectile at 
type: Type of projectile to spawn 
speed: Speed of the projectile in units per tic * 8
target: Thing ID of the thing you want the projectile fired at
newtid: TID you want assigned to the spawned projectile (optional)

Spawns a projectile that is fired at a target which can be any thing on the map. Note that this special requires the actor being spawned to have a SpawnID. To spawn an actor without one, use the SpawnProjectile function instead.

Usage:

TID is a number that makes a thing unique, the default is zero, and therefore a TID is usually set to something else, like 1. In Doom Builder you have to right click on a thing, select the Effects tab and change the Thing Tag to something besides 0.

The type is actually from the list of Spawn_numbers. You can either use the number or the defined name (T_SOMETHING) for clarity.

Speed is a number between 0-255.

Target TID is the same idea as the TID above, to see an example of changing the players TID check out Thing_ChangeTID.

New TID is just a way to make the spawned thing unique if you need to refer to it later. It is just a number.

Personal tools