Menu

Constant

Hugh Greene

Constants refer to "variables" that are
accessible everywhere, but whose value cannot change. That is, all
constants are read-only. Because of this, a constant isn't technically a
variable, but it is included with them for completeness and
categorization.

Below is a complete list of constants or pages with lists of constants.

  • pi and M_PI = 3.14...; The mathematical pi
    constant represents the ratio of the circumference of a circle to
    its diameter, and is used in many trigonometric calculations. The
    M_PI constant is specific to ENIGMA.
  • Boolean constants true (1) and false
    (0) which indicate that a condition is met
    or not, respectively.
  • Color constants can be used wherever a color is
    needed, such as arguments to drawing and blending functions. All
    color constants are prefixed with c_, for example c_blue.
  • DLL constants dll_stdcall and dll_cdecl define the type of
    dll cleanup method, while ty_real and ty_string define the
    data types.
  • File constants and Font
    Alignment constants start with fa_, for example fa_hidden,
    fa_center.
  • Event constants start with ev_, for example
    ev_alarm.
  • Particle constants start with ef_, pt_, and
    ps_.
    • Effect constants start with ef_, for
      example ef_cloud.
    • Particle type constants start with
      pt_, and in fact they also all start with pt_shape_, for
      example pt_shape_circle.
    • Particle system constants cover a
      variety of constants used in various functions. They all start
      with ps_, for example ps_distr_linear.
  • Render state constants used with d3d
    render mode/state functions
  • Audio for the audio system

Special object-placeholder constants:

  • self = -1; Represents this object. Useful for
    referring to the original object while inside a
    with construct.
  • other = -2; Represents the other object in a
    collision event.
  • all = -3; Represents all objects. Can be used in a
    with construct to execute code on all active
    instances in the room. Can also be used in
    many functions in place of an object argument.
  • noone = -4; Represents a null
    object, or that no object or instance is stored.
  • global = -5; Used with dot
    access
    to globally access a variable. Also
    used as a keyword to define such variables so that dot access is not
    needed.
  • local = -7; Used to allow otherwise
    scoped variables to continue to exist throughout
    other events of an instance. Otherwise, it is
    used in Game Maker with dot access to refer to variables local to
    the current scope (declared with var).

Deprecated constants (see individual pages
for deprecation information and replacements):


Related

Wiki: Audio_constants
Wiki: Boolean
Wiki: Color
Wiki: Constants
Wiki: Deprecated
Wiki: Device_constants
Wiki: Documentation
Wiki: Event
Wiki: Font
Wiki: Keyboard_constants
Wiki: MediaWiki_help
Wiki: Network_constants
Wiki: Render_state
Wiki: Shader_constants
Wiki: Texture_constants
Wiki: Variable

MongoDB Logo MongoDB