4/30/2023 0 Comments Bzflag plugins![]() Call the Flush() function (to unregister your event callbacks).This method is called whenever the plug-in is unloaded and is where you need to: Virtual void Cleanup () to "virtual void Cleanup () " section Register which events we'll be listening to.In this method, we will need to do the following: This method is where all of the plug-in configuration is done and is the method that is called when the plug-in is loaded. virtual void Init (const char* config) to "virtual void Init (const char* config) " section This method defines the name of the plugin and what will be returned in debug messages and when /listplugins is run. The four methods that each plug-in must define are the following: virtual const char* Name () to "virtual const char* Name () " section Plug-in Core + Setup to "Plug-in Core + Setup" section ![]() For the rest of this tutorial, I'll be relying heavily on this generator. I have a built an (opinionated) generator, which will build the skeleton of your plugin and will take care of all the configuration of everything. This should make sense as you continue to read further in this tutorial. For example, when I say there are three methods each plug-in must define I mean there are three methods that the plug-in's class must define. Moving forward in this tutorial, when the word "plug-in" is used, it refers to the class that defines the plug-in's functionality. Right? In this first chapter, I'll be going over the structure of a plug-in while building our first sample plug-in.īZFlag plug-ins are written in C++ and each plug-in is a class which extends the bz_Plugin base class. Interstellar space pirate extraordinaire īack in 2015, I said I'd write this series.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |