A_Weave
Jump to navigation
Jump to search
A_Weave (int horzspeed, int vertspeed, float horzdist, float vertdist)
A generalized version of A_BishopMissileWeave and A_CStaffMissileSlither. You have to call this function repeatedly to have a permanent effect.
A_BishopMissileWeave is equivalent to A_Weave(2, 2, 2.0, 1.0); A_CStaffMissileSlither is equivalent to A_Weave(3, 0, 1.0, 0.0).
Parameters
A weave in ZDoom can be understood as the sum of two waves, a horizontal and a vertical one.
- horzspeed: the speed at which the projectile weaves horizontally; that is to say, it affects the frequency of the horizontal wave.
- vertspeed: same but for the vertical wave.
- horzdist: the maximum distance to which the projectile will horizontally stray from its linear trajectory; that is to say, the semi-amplitude of the horizontal wave.
- vertdist: same but for the vertical wave.
In addition to these parameters, the actor's WeaveIndexXY and WeaveIndexZ properties as well as the frequency at which A_Weave is called are both instrumental in determining the exact behavior of projectile.
Example
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated. |