Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A Module is just a special flavor of a Flowgraph. This means ANY Flowgraph can become a Module with a few simple modifications made to it. So pick your favorite Flowgraph that you want to turn into a Module, or create a simple one to work with. The first thing you will need to do is place a Module:Start Node. This acts as the starting point for your Module when it is called. It also carries over any input sent from the Caller Node (more on this later).

Image Added

Outputs:

  • Start - Called when Module is loaded. Treat this like you would the Misc:Start Node.
  • Entity - EntityId assigned to the Module as its Graph Entity. This is your your own reference; any Node that is either set to use the Graph Entity or not assigned an Entity will automatically use this.
  • Param1 - Additional parameter data passed from the Caller Node.
  • Param2 - Additional parameter data passed from the Caller Node.
  • Param3 - Additional parameter data passed from the Caller Node.
  • Param4 - Additional parameter data passed from the Caller Node.
  • Param5 - Additional parameter data passed from the Caller Node.
  • Param6 - Additional parameter data passed from the Caller Node.

After you have placed the Starting point, you may want to place an Ending point by using the Module:Return Node. Note that this set is not required. When a Module returns, it is unloaded and stops executing. If you want your Module to always remain executing while the level is being played, then don't return from it! Returning from a Module does allow you to pass optional data back to the Caller.

Image Added

Inputs:

  • End - Call to return from the Module with a Success status.
  • Cancel - Call to return from the Module with a Fail status.
  • Param1 - Additional parameter data passed back to the Caller Node.
  • Param2 - Additional parameter data passed back to the Caller Node.
  • Param3 - Additional parameter data passed back to the Caller Node.
  • Param4 - Additional parameter data passed back to the Caller Node.
  • Param5 - Additional parameter data passed back to the Caller Node.
  • Param6 - Additional parameter data passed back to the Caller Node.

...

So now we have this Module ready to be used in our level. To call the Module, all we need to do is use the Module:Call Node.

Image Added

Inputs:

  • Call - Call to load the Module and begin its execution.
  • Module - Name of the Module to call. This should match the name of the Xml file you saved in the previous step. You do not have to include the ".xml" part.
  • Entity - EntityId that should be this Module's Graph Entity.
  • Param1 - Additional parameter data to pass to the Module's Start nodes.
  • Param2 - Additional parameter data to pass to the Module's Start nodes.
  • Param3 - Additional parameter data to pass to the Module's Start nodes.
  • Param4 - Additional parameter data to pass to the Module's Start nodes.
  • Param5 - Additional parameter data to pass to the Module's Start nodes.
  • Param6 - Additional parameter data to pass to the Module's Start nodes.

...