https://eternity.youfailit.net/index.php?title=SpawnProjectile&feed=atom&action=historySpawnProjectile - Revision history2024-03-28T21:14:49ZRevision history for this page on the wikiMediaWiki 1.39.2https://eternity.youfailit.net/index.php?title=SpawnProjectile&diff=4395&oldid=prevPrintz: Created page with "==ACS built-in function== '''SpawnProjectile'''(''int'' ''tid'', ''string'' ''type'', ''int'' ''angle'', ''fixed'' ''speed'', ''fixed'' ''vspeed'', ''bool'' ''gravity'', ''int..."2019-02-08T18:47:13Z<p>Created page with "==ACS built-in function== '''SpawnProjectile'''(''int'' ''tid'', ''string'' ''type'', ''int'' ''angle'', ''fixed'' ''speed'', ''fixed'' ''vspeed'', ''bool'' ''gravity'', ''int..."</p>
<p><b>New page</b></p><div>==ACS built-in function==<br />
'''SpawnProjectile'''(''int'' ''tid'', ''string'' ''type'', ''int'' ''angle'', ''fixed'' ''speed'', ''fixed'' ''vspeed'', ''bool'' ''gravity'', ''int'' ''newtid'')<br />
<br />
Spawns and throws a projectile. Parameters are:<br />
* ''[[tid]]'': tag of things to spawn projectiles from. One projectile is spawned for each tagged thing. As usual, it can be activator or any of the four coop players; see [[tid]] for info.<br />
* ''type'': name of thingtype to spawn as projectile. NOTE: this also supports the ZDoom names of things. See "compatname" from [[thingtype]] if you want to use those names. It's not limited to projectiles, any thing class would work.<br />
* ''angle'': [[byte angle]] of projectile direction.<br />
* ''speed'': expressed in ''fixed point'' (use the decimal point to get correct values). This is in eights of units actually; to achieve a speed of 10 for example (like the imp fireball), use 80.0.<br />
* ''vspeed'': vertical speed. Same measurement unit as ''speed''<br />
* ''gravity'': if nonzero, projectile will be subject to low gravity (it will get the '''LOGRAV''' [[thing type flags|thing flag]]). Applies even if original definition can't fall.<br />
* ''newtid'': optional TID to give the new thing, so it can be tracked by subsequent ACS functions.<br />
<br />
==Notes==<br />
The spawned thing will play its sight sound. It does ''not'' need to be a projectile; you can use this function to spawn monsters too, and if ''gravity'' is 0, such monsters will fly. Be careful however, unlike dedicated thing spawners, this function doesn't check if the thing can fit, so it can spawn stuck monsters. This function was mainly designed to spawn projectiles.<br />
<br />
==See also==<br />
===Linedef specials===<br />
*[[Thing_Projectile]]<br />
*[[Thing_ProjectileGravity]]<br />
<br />
[[Category:ACS]]</div>Printz