Skip to content
Morgan Willcock edited this page Oct 6, 2019 · 10 revisions

Standard Enumerated Types

AGS has several enumerated types in it's standard header. These are used in calls to various commands, and will usually pop up automatically in autocomplete. However, for times where autocomplete doesn't do the job, having a manual reference is invaluable:

enum BlockingStyle {
  eBlock,
  eNoBlock
};

Used by: Character.Animate, Character.FaceCharacter, Character.FaceLocation, Character.FaceObject, Character.Move, Character.Walk, Character.WalkStraight, Object.Animate, Object.Move

enum CharacterDirection {
  eDirectionDown = 0,
  eDirectionLeft,
  eDirectionRight,
  eDirectionUp,
  eDirectionDownRight,
  eDirectionUpRight,
  eDirectionDownLeft,
  eDirectionUpLeft,
  eDirectionNone = SCR_NO_VALUE
};

Used by: Character.ChangeRoom, Character.FaceDirection

enum Direction {
  eForwards,
  eBackwards
};

Used by: Character.Animate, Object.Animate

enum WalkWhere {
  eAnywhere,
  eWalkableAreas
};

Used by: Character.Move, Character.Walk, Object.Move

enum StopMovementStyle
{
  eKeepMoving = 0,
  eStopMoving = 1
};

Used by: Character.LockView, Character.LockViewFrame

enum RepeatStyle {
  eOnce,
  eRepeat
};

Used by: Button.Animate, Character.Animate, Object.Animate

enum Alignment {
  eAlignNone          = 0,
  eAlignTopLeft       = 1,
  eAlignTopCenter     = 2,
  eAlignTopRight      = 4,
  eAlignMiddleLeft    = 8,
  eAlignMiddleCenter  = 16,
  eAlignMiddleRight   = 32,
  eAlignBottomLeft    = 64,
  eAlignBottomCenter  = 128,
  eAlignBottomRight   = 256,

  eAlignHasLeft       = 73,
  eAlignHasRight      = 292,
  eAlignHasTop        = 7,
  eAlignHasBottom     = 448,
  eAlignHasHorCenter  = 146,
  eAlignHasVerCenter  = 56
};

The Alignment enumeration consists of values that could be summed up in one integer variable to form a more complex combination of alignments. Although that ability is not used anywhere in practice yet, but may be in future. Additionally, it provides a set of masks that could be applied bitwise to check if alignment variable contains one of the distinct directions, for example:

if (align & eAlignHasLeft)
  // some code here

will execute some code if align variable contains "Left" in any combination (eAlignTopLeft, eAlignMiddleLeft or eAlignBottomLeft).

Compatibility: new version of Alignment enum was introduced in AGS 3.5.0. Previous Alignment was renamed into HorizontalAlignment.

Used by: Button.TextAlignment

enum HorizontalAlignment {
  eAlignLeft          = 1,
  eAlignCenter        = 2,
  eAlignRight         = 4
};

Note that HorizontalAlignment's values match first values of Alignment enumeration (eAlignTopLeft, eAlignTopCenter, eAlignTopRight).

Compatibility: replaced old Alignment enumeration in AGS 3.5.0.

Used by: Character.LockViewAligned, DrawingSurface.DrawStringWrapped, Label.TextAlignment, ListBox.TextAlignment, Speech.TextAlignment

enum eFlipDirection {
  eFlipLeftToRight,
  eFlipUpsideDown,
  eFlipBoth
};

Used by: DynamicSprite.Flip

enum TransitionStyle {
  eTransitionFade,
  eTransitionInstant,
  eTransitionDissolve,
  eTransitionBoxout,
  eTransitionCrossfade
};

Used by: SetScreenTransition, SetNextScreenTransition

enum MouseButton {
  eMouseLeft,
  eMouseRight,
  eMouseMiddle,
  eMouseLeftInv,
  eMouseMiddleInv,
  eMouseRightInv,
  eMouseWheelNorth,
  eMouseWheelSouth
};

Used by: Mouse.IsButtonDown
Passed into: on_mouse_click

enum EventType {
  eEventLeaveRoom,
  eEventEnterRoomBeforeFadein,
  eEventGotScore,
  eEventGUIMouseDown,
  eEventGUIMouseUp,
  eEventAddInventory,
  eEventLoseInventory,
  eEventRestoreGame
};

Passed into: on_event

enum RoundDirection {
  eRoundDown,
  eRoundNearest,
  eRoundUp
};

Used by: FloatToInt

enum eSpeechStyle {
  eSpeechLucasarts,
  eSpeechSierra,
  eSpeechSierraWithBackground,
  eSpeechFullScreen
};

Used by: Speech.Style

enum SkipSpeechStyle {
  eSkipKeyMouseTime = 0,
  eSkipKeyTime      = 1,
  eSkipTime         = 2,
  eSkipKeyMouse     = 3,
  eSkipMouseTime    = 4,
  eSkipKey          = 5,
  eSkipMouse        = 6
};

Used by: Speech.SkipStyle

enum eVoiceMode {
  eSpeechTextOnly,
  eSpeechVoiceAndText,
  eSpeechVoiceOnly
};

Used by: Speech.VoiceMode

enum DialogOptionState {
  eOptionOff,
  eOptionOn,
  eOptionOffForever
};

Used by: Dialog.GetOptionState, Dialog.SetOptionState

enum CutsceneSkipType {
  eSkipESCOnly,
  eSkipAnyKey,
  eSkipMouseClick,
  eSkipAnyKeyOrMouseClick,
  eSkipESCOrRightButton,
  eSkipScriptOnly
};

Used by: StartCutscene

enum eOperatingSystem {
  eOSDOS,
  eOSWindows,
  eOSLinux,
  eOSMacOS,
  eOSAndroid,
  eOSiOS,
  eOSPSP
};

Used by: System.OperatingSystem

enum eCDAudioFunction {
  eCDIsDriverPresent,
  eCDGetPlayingStatus,
  eCDPlayTrack,
  eCDPausePlayback,
  eCDResumePlayback,
  eCDGetNumTracks,
  eCDEject,
  eCDCloseTray,
  eCDGetCDDriveCount,
  eCDSelectActiveCDDrive
};

Used by: CDAudio

enum CursorMode {
  eModeXXXX,
  eModeXXXX,
  ...
};

The CursorMode enumeration is generated automatically based on your mouse cursors. The cursor mode name is taken, all its spaces are removed, and eMode is added to the front.
Used by: IsInteractionAvailable, Room.ProcessClick, Mouse.ChangeModeGraphic, Mouse.ChangeModeHotspot, Mouse.DisableMode, Mouse.EnableMode, Mouse.IsModeEnabled, Mouse.UseModeGraphic, Mouse.Mode, InventoryItem.IsInteractionAvailable, InventoryItem.RunInteraction, Hotspot.IsInteractionAvailable, Hotspot.RunInteraction, Object.IsInteractionAvailable, Object.RunInteraction, Character.IsInteractionAvailable, Character.RunInteraction

enum FontType {
  eFontXXXX,
  eFontXXXX,
  ...
};

The FontType enumeration is generated automatically based on your fonts. The font name is taken, all its spaces are removed, and eFont is added to the front.
Used by: Button.Font, DrawingSurface.DrawMessageWrapped, DrawingSurface.DrawString, DrawingSurface.DrawStringWrapped, Game.NormalFont, Game.SpeechFont, GetTextHeight, GetTextWidth, Label.Font, ListBox.Font, TextBox.Font, Overlay.CreateTextual, Overlay.SetText

enum LocationType {
  eLocationNothing,
  eLocationHotspot,
  eLocationCharacter,
  eLocationObject
};

Returned by: GetLocationType

enum FileMode {
  eFileRead,
  eFileWrite,
  eFileAppend
};

Used by: File.Open

enum FileSeek {
  eSeekBegin = 0,
  eSeekCurrent = 1,
  eSeekEnd = 2
};

Used by: File.Seek

enum DialogOptionSayStyle {
  eSayUseOptionSetting,
  eSayAlways,
  eSayNever
};

Used by: Dialog.DisplayOptions

enum VideoSkipStyle {
  eVideoSkipNotAllowed,
  eVideoSkipEscKey,
  eVideoSkipAnyKey,
  eVideoSkipAnyKeyOrMouse
};

Used by: PlayVideo

enum AudioFileType {
  eAudioFileOGG,
  eAudioFileMP3,
  eAudioFileWAV,
  eAudioFileVOC,
  eAudioFileMIDI,
  eAudioFileMOD
};

Used by: AudioClip.FileType

enum AudioPriority {
  eAudioPriorityVeryLow = 1,
  eAudioPriorityLow = 25,
  eAudioPriorityNormal = 50,
  eAudioPriorityHigh = 75,
  eAudioPriorityVeryHigh = 100
};

Used by: AudioClip.Play, AudioClip.PlayFrom, AudioClip.PlayQueued

enum GUIPopupStyle {
  eGUIPopupNormal = 0,
  eGUIPopupMouseYPos = 1,
  eGUIPopupModal = 2,
  eGUIPopupPersistent = 3
};

Supported by: AGS 3.5.0 and higher.

Used by: GUI.PopupStyle

enum StringCompareStyle {
  eCaseInsensitive = 0,
  eCaseSensitive = 1
};

Supported by: AGS 3.5.0 and higher.

Used by: Dictionary.Create, Set.Create, String.CompareTo, String.EndsWith, String.Replace, String.StartsWith

enum SortStyle {
  eNonSorted = 0,
  eSorted = 1
};

Supported by: AGS 3.5.0 and higher.

Used by: Dictionary.Create, Set.Create

Getting Started in AGS

Introduction

Frequently Asked Questions

Tutorial

Editor Reference

Room Editor

Character Editor

GUI Editor

Sprite Manager

View Editor

Inventory Items Editor

Other Features

Engine

The run-time engine

Graphics driver selection

Engine Setup Program

Scripting

Scripting Language

Scripting API

Reference

Working on Legacy games

Upgrading from a previous version

Legal Notice

Copyright and terms of use

Anonymous usage information

Credits

Getting in touch

Contacting the developers

Clone this wiki locally