endanim / endtime
Is your feature request related to a problem? Please describe. I'm always frustrated when I have to use script to handle a time-based change and I think it could be more user friendly.
Describe the solution you'd like We could have an animation header command, on the same way we have "followanim / followcond" (the concept is almost the same), but it would work as an easy way to use time based animation changes without using scripts.
endtime (int) The amount of time, in centiseconds, that the current animation should last. After that time is over, the entity would go to...
endanim (animation_name_constant) the desired animation, but instead of using only follow animations (like followanim), we could let it use any animation, using the openborconstant format.
Examples:
endtime 60
endanim ANI_JUMP
Describe alternatives you've considered I've tried using script for that and, while I managed it to work, it's a basic thing the engine could have a native solution. Sure, we need to think about if it would work like "changeentityproperty" or a "performattack" or even "take_action", in some cases.
Solutions for this: a) have an extra value, after the animation_name_constant which would tell if its a changeentity or performattack b) have the code decided it internally, based on the animation_name_constant name. • Is a common animation, like walk, jump, idle? -> take_action • Is a attack animation (attack or freespecial)? -> performattack • Is anything else? -> changeentityproperty
Additional context endtime would get the "elapsed_time" from the start of the current animation and use it as a timer.