WeaponSetTics: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "{{Codepointer|description= Like SetTics, but for weapon frames, changes duration of current frame. |usage='''A_WeaponSetTics'''(''base_amount'', ''random'', ''use_counter'') |parameters= *''base_amount'': if ''use_counter'' is 0, it's number of tics. If ''use_counter'' is 1, it's a counter ID for the current weapon, from 0 to 2. *''random'': if nonzero, it's maximum random value + 1 which may be added to the duration. *''use_counter'': if 0, ''base_amount'' is a numb...")
 
(No difference)

Latest revision as of 15:26, 12 October 2024

Description

Like SetTics, but for weapon frames, changes duration of current frame.

Usage

A_WeaponSetTics(base_amount, random, use_counter)

Parameters

  • base_amount: if use_counter is 0, it's number of tics. If use_counter is 1, it's a counter ID for the current weapon, from 0 to 2.
  • random: if nonzero, it's maximum random value + 1 which may be added to the duration.
  • use_counter: if 0, base_amount is a number. If 1, base_amount is actually the counter number.

Examples

No examples given.

Notes

This changes a player weapon frame duration according to the formula, in much the same way SetTics operates on non-weapon (actor) frames.

The base value is either direct, or taken from a weapon counter. The optional additive random range is from 0 to (random - 1).

See also