Kratus said:
The only exception is about on-framechange because sometimes I want to run a script in each frame of the a specific animation without write a lot of "@cmd" with the same function. I think that this may leave the character files more clean and precise to read and edit.
It will work like update scripts in each tick, but for each frame change.
That IS how animation scripts work. You just need to use the right tags.
@script and
@end_script tags run on every frame of an animation they are in. I normally don't recommend them, but that's only because authors tend to use way too much inline code in their text files. But when used to call functions instead, they are great - clean, and efficient.
Code:
@script
some_function();
@end_script
frame ...
frame ...
frame ...
frame ...
Now
some_function() will run on every frame of the animation. Simple as that. No need for @cmd clutter.
So basically, if you want to run functions on a specific frame, use
@cmd. If you want to run one or more functions on all frames, use
@script /
@end_script. When you want to insert code directly into the model's text file, don't. Write a function, and see previous statement.
DC