A_FogSpawn

Decrements the calling actor's special1 field and does nothing if this value is still positive.

A_FogSpawn
(no parameters)

Otherwise, reset this field to the value from the calling actor's args[2] field. This value therefore serves as a frequency control on an inverse scale: the larger the value, the less often will calls to this function spawn anything.

Randomly spawns at the calling actor's position a small, medium or large fog patch.

The patch is given an angle corresponding to the spawner's angle plus a random deviation computed from the spawner's args[1] field: each point of args[1] corresponds to a maximum of about 0.7° of deviation either clockwise or counterclockwise.

In addition, the patch is also given values for its args[] and special2 fields which are meant to influence how the patch moves and how long it lives, see A_FogMove for further information on how fog patches react to these arguments:

Fog patchSet valueNote
args[0]randomly between 1 and the spawner's args[0]+1Controls speed
args[3]spawner's args[3]Controls lifetime
args[4]1Flags the fog patch as moving
special2randomly between 0 and 63Used for vertical bobbing

This codepointer is restricted to FogSpawner and derived classes.

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.