Solved animationscript .c limitations and conflicts

Question that is answered or resolved.

dantedevil

Well-known member
Hello!

Recently O Ilusionista tell me about certain conflicts between some scripts.
For this i wanna know more of this concflits because i am sure my mod has.

Is there any limit to the number of scripts in the amimationscript file?
 
There is only one script file allowed, but within that script file you can have as many functions (what you're probably referring to as "scripts") as you like.

That said, the more functions included, the more get loaded and you can bloat a module pretty fast. It's generally a good idea to start breaking down huge files into smaller components. Then you create an animation script for your models that imports only the files that are needed for that model to work. This methodology allows you to reuse code without wasting memory by making every single model load up a bunch of script functions it probably isn't using. Incidentally, this applies to all the script events, not just animation.

Pro tip: When you first start out it's tempting to move every single function into its own file, but as I discovered that will quickly become an organizational and maintenance nightmare. A good middle ground is to create files that contain a few closely related functions in a group. Ex: One file for your grappling functions, another for graphic effects, and so on.

DC
 
DC, I said that to him because his mod (and NSW25 mod) have some strange behavior. You can include a working code to their mods and the code doesn't works (and there is nothing on the log too). In NSW25 case, I saw it myself.

There is some conflict, but I can't see where. Its the same case of the uTunnels's afterimage. It works on his mod, but when I copy one char (and the scripts) from that mod to mine, nothing happens - neither on the logs.
 
Back
Top Bottom