Dynamic adding/removing of character animations
by Phoenix Online Studios · in Torque Game Engine · 11/06/2006 (1:04 pm) · 0 replies
I'm looking for a good solution to the following problem.
We use aiPlayers with a ton of different animations. Having all of their sequences defined in the corresponding TSShapeConstructors is becoming a problem, not only because of the limit to how many animations that can actually be added there (yes, I know this limit can be extended with a few simple changes to the engine code) but also because it would be much easier if animations that are only intended to be used once are added at other parts in the script.
Ideally, I'd like to keep a few base animations in the datablock as usual, and then have the ability to add and remove sequences in the list at a later stage, when the aiPlayer is already created. A solution that requires the deletion and re-creation of the aiPlayers to change the animation status would be acceptable as well, but I want to avoid having to explicitly specify a datablock with hard-coded sequence numbers for each set of animations that I want to use on the same character.
Solving this with engine modifications (e.g. by creating console functions for adding and removing individual sequences) seems doable, but I'm not fully sure how this stuff works so it might be more difficult than it's worth. I'm still trying to come up with some possible scripted alternative that would be easier to implement.
Any ideas?
We use aiPlayers with a ton of different animations. Having all of their sequences defined in the corresponding TSShapeConstructors is becoming a problem, not only because of the limit to how many animations that can actually be added there (yes, I know this limit can be extended with a few simple changes to the engine code) but also because it would be much easier if animations that are only intended to be used once are added at other parts in the script.
Ideally, I'd like to keep a few base animations in the datablock as usual, and then have the ability to add and remove sequences in the list at a later stage, when the aiPlayer is already created. A solution that requires the deletion and re-creation of the aiPlayers to change the animation status would be acceptable as well, but I want to avoid having to explicitly specify a datablock with hard-coded sequence numbers for each set of animations that I want to use on the same character.
Solving this with engine modifications (e.g. by creating console functions for adding and removing individual sequences) seems doable, but I'm not fully sure how this stuff works so it might be more difficult than it's worth. I'm still trying to come up with some possible scripted alternative that would be easier to implement.
Any ideas?