A libary is a collection of triggers and/ or code that can be reused and imported into other maps or mods. This could contain triggers, custom scripts, functions, event/ condition/ action definitions, preset types, records, variables, etc. Basically any code can be stored in a library.
It is usually written to be re-usable and self contained, so that if you drop it into a new map or mod it should be relatively easy to setup. The complexity varies for each library as well.
After it is written, the library can be exported and imported into other maps. Instead of having to copy the folder of code, you just import the library package.
For example, If you were to write game systems, such as reading and writing to a bank, dialog setup and styling, waves and spawning, custom triggered abilities, etc., it would be best to save them in libraries. That way you can export it to a library which can be imported into any map or mod easily. This allows you to reuse the code in a different map, or share it with others.
bulletbutter AuthorI was under the impression that a trigger library was simply a bunch of triggers that you could use for several different maps. For example, say you create a map with triggers for a defense game. You create triggers for spawns, levels, timers, dialog windows, dialog buttons, score/leader boards and a life counter. You then create a new library and move all the triggers to said library and export the library. You create a new map and import the library and all the triggers in the library will occur in the new map.
However, I was sorely mistaken and it leaves me completely in the dark about what a library actually does. I have used a few libraries for testing purposes and noticed you can do things like create custom talent trees, level spawning for defense maps....and even on a major scale, you can add entire mechanics like they cortex rp library.
I did a search and couldn't find anything (tutorial wise) for how to create and work with a library. So, can someone explain to me what a library does and give me a quick example?
The Team - TnTProductions