SetTics: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
(Might be too verbose) |
No edit summary |
||
Line 10: | Line 10: | ||
'''SetTics''' is a parameterized codepointer to set a thing's calling frame tics (duration) value. It can be used to vary the duration of thing frames dynamically and/or randomly. The duration is set by this range: ''baseamt'' to ''baseamt'' + ''rnd'' - 1. ''Rnd'' can be zero to disable the randomness. | '''SetTics''' is a parameterized codepointer to set a thing's calling frame tics (duration) value. It can be used to vary the duration of thing frames dynamically and/or randomly. The duration is set by this range: ''baseamt'' to ''baseamt'' + ''rnd'' - 1. ''Rnd'' can be zero to disable the randomness. | ||
==Notes== | |||
This is not designed for weapon frames. If you decide to use it anyway, it will change the actor object's (player sprite's) frame duration, instead of changing the weapon frame duration. | |||
[[Category:Codepointers]] | [[Category:Codepointers]] |
Latest revision as of 14:32, 12 September 2024
SetTics(baseamt, rnd, counter)
- baseamt: base amount
- If the counter field is set as constant, baseamt designates the base (non-random) number to set the frame duration to. If counter is set as counter, baseamt designates the counter number (0 to 7) containing the value.
- rnd: randomizer modulus value (0 == not randomized)
- If nonzero and positive, a random number between 0 and rnd - 1 will be added to baseamt when setting the frame duration.
- counter: counter toggle
- Can be one of the following values:
- 0 or constant: baseamt is a direct value
- 1 or counter: baseamt is a counter number containing the useful value
SetTics is a parameterized codepointer to set a thing's calling frame tics (duration) value. It can be used to vary the duration of thing frames dynamically and/or randomly. The duration is set by this range: baseamt to baseamt + rnd - 1. Rnd can be zero to disable the randomness.
Notes[edit]
This is not designed for weapon frames. If you decide to use it anyway, it will change the actor object's (player sprite's) frame duration, instead of changing the weapon frame duration.