-
Notifications
You must be signed in to change notification settings - Fork 10
StandardEnums
AGS has several enumerated types in its 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 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 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 BlockingStyle {
eBlock,
eNoBlock
};
Used by: Character.Animate
,
Character.FaceCharacter
,
Character.FaceLocation
,
Character.FaceObject
,
Character.Move
,
Character.Walk
,
Character.WalkStraight
,
Object.Animate
,
Object.Move
enum eCDAudioFunction {
eCDIsDriverPresent,
eCDGetPlayingStatus,
eCDPlayTrack,
eCDPausePlayback,
eCDResumePlayback,
eCDGetNumTracks,
eCDEject,
eCDCloseTray,
eCDGetCDDriveCount,
eCDSelectActiveCDDrive
};
Used by: CDAudio
enum CharacterDirection {
eDirectionDown = 0,
eDirectionLeft,
eDirectionRight,
eDirectionUp,
eDirectionDownRight,
eDirectionUpRight,
eDirectionDownLeft,
eDirectionUpLeft,
eDirectionNone = SCR_NO_VALUE
};
Used by: Character.ChangeRoom
,
Character.FaceDirection
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 CutsceneSkipType {
eSkipESCOnly,
eSkipAnyKey,
eSkipMouseClick,
eSkipAnyKeyOrMouseClick,
eSkipESCOrRightButton,
eSkipScriptOnly
};
Used by: StartCutscene
enum DialogOptionSayStyle {
eSayUseOptionSetting,
eSayAlways,
eSayNever
};
Used by: Dialog.DisplayOptions
enum DialogOptionState {
eOptionOff,
eOptionOn,
eOptionOffForever
};
Used by: Dialog.GetOptionState
,
Dialog.SetOptionState
enum Direction {
eForwards,
eBackwards
};
Used by: Character.Animate
,
Object.Animate
enum EventType {
eEventLeaveRoom,
eEventEnterRoomBeforeFadein,
eEventGotScore,
eEventGUIMouseDown,
eEventGUIMouseUp,
eEventAddInventory,
eEventLoseInventory,
eEventRestoreGame,
eEventEnterRoomAfterFadein,
eEventLeaveRoomAfterFadeout,
eEventGameSaved
};
Compatibility: the eEventEnterRoomAfterFadein
is supported by AGS 3.6.0 and later versions.
The eEventLeaveRoomAfterFadeout
and eEventGameSaved
is supported by AGS 3.6.1 and later versions.
Passed into: on_event
enum FileMode {
eFileRead,
eFileWrite,
eFileAppend
};
Used by: File.Open
enum FileSeek {
eSeekBegin = 0,
eSeekCurrent = 1,
eSeekEnd = 2
};
Used by: File.Seek
enum eFlipDirection {
eFlipLeftToRight,
eFlipUpsideDown,
eFlipBoth
};
Used by: DynamicSprite.Flip
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 GUIPopupStyle {
eGUIPopupNormal = 0,
eGUIPopupMouseYPos = 1,
eGUIPopupModal = 2,
eGUIPopupPersistent = 3
};
Supported by: AGS 3.5.0 and higher.
Used by: GUI.PopupStyle
enum HorizontalAlignment {
eAlignLeft = 1,
eAlignCenter = 2,
eAlignRight = 4
};
Note that HorizontalAlignment's values match the 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 InputType
{
eInputNone = 0x00000000,
eInputKeyboard = 0x02000000,
eInputMouse = 0x04000000,
eInputAny = 0xFF000000
};
The InputType enumeration consists of values that could be summed up in one integer variable to form a combination of input types. This may be used to store several "types" in one integer, pass them into a function, or return from a function. You may use bitwise operation to check if a variable contains one of the distinct types, for example:
if (type & eInputKeyboard)
// some code here
will execute some code if type variable contains at least "eInputKeyboard".
Supported by: AGS 3.6.0 and higher.
Used by: Wait functions
enum LocationType {
eLocationNothing,
eLocationHotspot,
eLocationCharacter,
eLocationObject
};
Returned by: GetLocationType
enum LogLevel
{
eLogAlert = 1,
eLogFatal = 2,
eLogError = 3,
eLogWarn = 4,
eLogInfo = 5,
eLogDebug = 6
};
Supported by: AGS 3.6.0 and higher.
Used by: System.Log
enum MouseButton {
eMouseLeft,
eMouseRight,
eMouseMiddle,
eMouseLeftInv,
eMouseMiddleInv,
eMouseRightInv,
eMouseWheelNorth,
eMouseWheelSouth
};
Used by: Mouse.IsButtonDown
Passed into: on_mouse_click
enum eOperatingSystem {
eOSDOS,
eOSWindows,
eOSLinux,
eOSMacOS,
eOSAndroid,
eOSiOS,
eOSPSP,
eOSWeb,
eOSFreeBSD
};
Used by: System.OperatingSystem
enum RepeatStyle {
eOnce,
eRepeat
};
Used by: Button.Animate
,
Character.Animate
,
Object.Animate
enum RoundDirection {
eRoundDown,
eRoundNearest,
eRoundUp
};
Used by: FloatToInt
enum SkipSpeechStyle {
eSkipNone = -1,
eSkipKeyMouseTime = 0,
eSkipKeyTime = 1,
eSkipTime = 2,
eSkipKeyMouse = 3,
eSkipMouseTime = 4,
eSkipKey = 5,
eSkipMouse = 6
};
Used by: Speech.SkipStyle
enum SortStyle {
eNonSorted = 0,
eSorted = 1
};
Supported by: AGS 3.5.0 and higher.
Used by: Dictionary.Create
,
Set.Create
enum eSpeechStyle {
eSpeechLucasarts,
eSpeechSierra,
eSpeechSierraWithBackground,
eSpeechFullScreen
};
Used by: Speech.Style
enum StopMovementStyle
{
eKeepMoving = 0,
eStopMoving = 1
};
Used by: Character.LockView
,
Character.LockViewFrame
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 TransitionStyle {
eTransitionFade,
eTransitionInstant,
eTransitionDissolve,
eTransitionBoxout,
eTransitionCrossfade
};
Used by: SetScreenTransition
,
SetNextScreenTransition
enum VideoSkipStyle {
eVideoSkipNotAllowed,
eVideoSkipEscKey,
eVideoSkipAnyKey,
eVideoSkipAnyKeyOrMouse
};
Used by: PlayVideo
enum eVoiceMode {
eSpeechTextOnly,
eSpeechVoiceAndText,
eSpeechVoiceOnly
};
Used by: Speech.VoiceMode
enum WalkWhere {
eAnywhere,
eWalkableAreas
};
Used by: Character.Move
,
Character.Walk
,
Object.Move
Getting Started in AGS
Editor
- New Game templates
- Editor Preferences
- General Settings
- Default Setup
- Colours Editor
- Room Editor
- Character Editor
- Cursor Editor
- Dialog Editor
- Font Preview
- GUI Editor
- Inventory Items Editor
- View Editor
- Sprite Manager
- Music and sound
- Voice speech
- Script Modules
- System limits
- Log Panel
- Plugins
- Other Features
Engine
Scripting
- Scripting Tutorial
- Scripting Language
-
Scripting API
- Script API Overview
- Standard Constants
- Standard Enumerated Types
- Standard Types
- Game variables
- Global arrays
- Global event handlers
- repeatedly_execute / repeatedly_execute_always
- Custom dialog options rendering
- Global functions: general
- Global functions: message display
- Global functions: multimedia actions
- Global functions: palette operations
- Global functions: room actions
- Global functions: screen effects
- Global functions: wait
- AudioChannel functions and properties
- AudioClip functions and properties
- Camera functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- Dictionary functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game functions and properties
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Object functions and properties
- Overlay functions and properties
- Parser functions
- Region functions and properties
- Room functions and properties
- Screen functions and properties
- Set functions and properties
- Speech functions and properties
- String functions
- System functions and properties
- TextWindowGUI functions and properties
- ViewFrame functions and properties
- Viewport functions and properties
- Obsolete Script API
- Event Types
- Key code table
- Audio in script
Legal Notice
Getting in touch
Misc