![]() ![]() beforeAge This is called when the creep has one tick left.onSpawnEnd() This is called when the creep has finished spawning.onSpawnStart() This is called when the spawner has started spawning.onSpawn() This is called when the spawner has started spawning. #SCREEPS BODY PARTS CODE#So far the code supports handling the following events: Running a turn any more complicated, as the rest of the code will simply take the new role into account.Įach role in this codebase extends from the role_prototype.js code, for some shared functionality. This means that it should be relatively easy to simply add a new role without making your code for To make things simple, I've split each role up into it's own file, containing it's list of parts (and sometimes a list anĪrray of these lists). Of "miner" it's AI code will be located in roles_miner.js Roles Relates to the AI for that role in the file roles_. The role argument here refers to a human readable name for the list of body parts and AI for a creep. The spawner module has 4 methods for use. You want to share your particular body parts config, or the ai, for a role with someone else, it should be easy to simply The roles are a set of classes that are made to be sharable between projects, so if The spawner mainly uses what is known as a role to make human readable aliases to spawn off of, as well as containing some This library includes a number of things, the main two of which are the are the roles functionality and the spawner. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |