MPUZ: Plugins

From Mario Fan Games Galaxy Wiki
Revision as of 00:14, 15 May 2009 by Xgoff (talk | contribs) (MPUZ: Modules moved to MPUZ: Plugins: no longer called modules... duh)
This information is subject to change.
MPUZ
Mpuz logo.png
Development Main Page
Basics
Intermediate
Advanced
  • none
Reference
[Edit]


Modules are special precoded functions that can be added to object code to make the object inherit some sort of behavior. For example, an MP_Shell object contains mod.hasmovement() and mod.frictionless() modules. The former gives the object gravity, slope support, and basic background collisions, while the latter keeps the object from decelerating on slopes... or any surface for that matter. Some modules can take parameters, which allows various default values to be changed.

When a module is activated, it makes an entry in its object's mod table. For example, mod.hasmovement() will set me.mod.hasmovement to true, activating the module and initializing any variables that it uses. Some modules may automatically activate other modules.

Module list

  • mod.frictionless(): Object will never decelerate, and will keep moving until its motion is stopped another way.
  • mod.hasmovement(): Object is affected by gravity, and has background collision and slope support. However, it does not make the object controllable by the player.
  • mod.wrap(): Object will wrap around the level boundaries should it leave them.