Obsolete Script API

As new versions of AGS are released this sometimes bring changes to the script commands. Following table lists the functions and variables removed from the Script API, their replacements (when available) and the version in which the change took place.

Obsolete API Superseded by Obsoleted in Version
AddInventory Character.AddInventory
AddInventoryToCharacter Character.AddInventory
AnimateCharacter Character.Animate
AnimateCharacterEx Character.Animate
AnimateObject Object.Animate
AnimateObjectEx Object.Animate
AreCharactersColliding Character.IsCollidingWithChar
AreCharObjColliding Character.IsCollidingWithObject
AreObjectsColliding Object.IsCollidingWithObject
Button.GetText Button.Text
Button.SetText Button.Text
CDAudio Use AudioClips
CentreGUI GUI.Centre
ChangeCharacterView Character.ChangeView
ChangeCursorGraphic Mouse.ChangeModeGraphic
ChangeCursorHotspot Mouse.ChangeModeHotspot
Character.GetPropertyText Character.GetTextProperty
Character.IgnoreWalkbehinds design your rooms without it and rely on Character.Baseline instead 3.5.0
Character.IgnoreScaling Character.ManualScaling
character[].activeinv Character.ActiveInventory
character[].animating Character.Animating
character[].animspeed Character.AnimationSpeed
character[].defview Character.NormalView
character[].frame Character.Frame
character[].inv Character.InventoryQuantity[]
character[].loop Character.Loop
character[].name Character.Name
character[].prevroom Character.PreviousRoom
character[].room Character.Room
character[].talkview Character.SpeechView
character[].thinkview Character.ThinkView
character[].walking Character.Moving
CreateGraphicOverlay Overlay.CreateGraphical
CreateTextOverlay Overlay.CreateTextual
DeleteSprite DynamicSprite.Delete
DisableCursorMode Mouse.DisableMode
DisableHotspot Hotspot.Enabled
DisableRegion Region.Enabled
DisplaySpeech Character.Say
DisplaySpeechAt Character.SayAt
DisplaySpeechBackground Character.SayBackground
DisplayThought Character.Think
DrawingSurface.UseHighResCoordinates This property was used to multiply by 2 the coordinates in 640x400 resolution games. 3.5.0
EnableCursorMode Mouse.EnableMode
EnableHotspot Hotspot.Enabled
EnableRegion Region.Enabled
FaceCharacter Character.FaceCharacter
FaceLocation Character.FaceLocation
File.ReadRawLine File.ReadRawLineBack
File.ReadString File.ReadStringBack
FileClose File.Close
FileIsEOF File.EOF
FileOpen File.Open
FileRead File.ReadStringBack
FileReadInt File.ReadInt
FileReadRawChar File.ReadRawChar
FileReadRawInt File.ReadRawInt
FileWrite File.WriteString
FileWriteInt File.WriteInt
FileWriteRawChar File.WriteRawChar
FileWriteRawLine File.WriteRawLine
FollowCharacter Character.FollowCharacter
FollowCharacterEx Character.FollowCharacter
game.close_mouth_end_speech_time Speech.AnimationStopTimeMargin
game.in_cutscene Game.InSkippableCutscene
game.items_per_line InvWindow.ItemsPerRow
game.num_inv_items InvWindow.ItemCount
game.room_height Room.Height
game.room_width Room.Width
game.skip_speech_specific_key Speech.SkipKey
game.skipping_cutscene Game.SkippingCutscene
game.speech_music_drop Game.SetAudioTypeSpeechVolumeDrop
game.speech_text_align Speech.TextAlignment
Game.StopSound Game.StopAudio
game.talkanim_speed Speech.GlobalSpeechAnimationDelay
game.text_speed Game.TextReadingSpeed
game.top_inv_item InvWindow.TopItem
Game.GlobalMessage Create a global array of strings. 3.X
GetButtonPic Button.Graphic
GetCharacterAt Character.GetAtScreenXY
GetCharacterProperty Character.GetProperty
GetCharacterPropertyText Character.GetTextProperty
GetCurrentMusic AudioChannel.PlayingClip
GetCursorMode Mouse.Mode
GetDialogOption Dialog.GetOptionState
GetGameParameter(GP_FRAMExxx) Game.GetViewFrame
GetGameParameter(GP_ISFRAMEFLIPPED) Game.GetViewFrame
GetGameParameter(GP_NUMCHARACTERS) Game.CharacterCount
GetGameParameter(GP_NUMFRAMES) Game.GetFrameCountForLoop
GetGameParameter(gp_numguis) Game.GUICount
GetGameParameter(GP_NUMINVITEMS) Game.InventoryItemCount
GetGameParameter(GP_NUMLOOPS) Game.GetLoopCountForView
GetGameParameter(gp_numobjects) Room.ObjectCount
GetGameParameter(gp_spriteheight) Game.SpriteHeight
GetGameParameter(gp_spritewidth) Game.SpriteWidth
GetGlobalInt Global Variables
GetGlobalString Game.GlobalStrings
GetGraphicalVariable Global Variables
GetGUIAt GUI.GetAtScreenXY
GetGUIObjectAt GUIControl.GetAtScreenXY
GetHotspotAt Hotspot.GetAtScreenXY
GetHotspotName Hotspot.Name
GetHotspotPointX Hotspot.WalkToX
GetHotspotPointY Hotspot.WalkToY
GetHotspotProperty Hotspot.GetProperty
GetHotspotPropertyText Hotspot.GetTextProperty
GetInvAt InventoryItem.GetAtScreenXY
GetInvGraphic InventoryItem.Graphic
GetInvName InventoryItem.Name
GetInvProperty InventoryItem.GetProperty
GetInvPropertyText InventoryItem.GetTextProperty
GetLocationName Game.GetLocationName
GetMessageText Create a global array of strings. 3.X
GetMIDIPosition AudioChannel.Position
GetMODPattern AudioChannel.Position
GetMP3PosMillis AudioChannel.Position
GetObjectAt Object.GetAtScreenXY
GetObjectBaseline Object.Baseline
GetObjectGraphic Object.Graphic
GetObjectName Object.Name
GetObjectProperty Object.GetProperty
GetObjectPropertyText Object.GetTextProperty
GetObjectX Object.X
GetObjectY Object.Y
GetPlayerCharacter player.ID
GetRawTime DateTime.RawTime
GetRegionAt Region.GetAtRoomXY
GetRoomProperty Room.GetProperty
GetRoomPropertyText Room.GetTextProperty
GetSaveSlotDescription Game.GetSaveSlotDescription
GetSliderValue Slider.Value
GetTextBoxText TextBox.Text
GetTime DateTime.Now
GetTranslationName Game.TranslationFilename
GetViewportX Game.Camera.X
GetViewportY Game.Camera.Y
GetWalkableAreaAt GetWalkableAreaAtScreen
GUIOff GUI.Visible
GUIOn GUI.Visible
HideMouseCursor Mouse.Visible
Hotspot.GetName Hotspot.Name
Hotspot.GetPropertyText Hotspot.GetTextProperty
InputBox Game.InputBox
InterfaceOff GUI.Visible
InterfaceOn GUI.Visible
InventoryItem.GetName InventoryItem.Name
InventoryItem.GetPropertyText InventoryItem.GetTextProperty
InventoryItem.SetName InventoryItem.Name
InventoryScreen create your own Inventory GUI
IsButtonDown Mouse.IsButtonDown
IsChannelPlaying AudioChannel.IsPlaying
IsGUIOn GUI.Visible
IsInventoryInteractionAvailable InventoryItem.IsInteractionAvailable
IsMusicVoxAvailable AudioClip.IsAvailable
IsObjectAnimating Object.Animating
IsObjectMoving Object.Moving
IsObjectOn Object.Visible
IsOverlayValid Overlay.Valid
Label.GetText Label.Text
Label.SetText Label.Text
ListBox.GetItemText ListBox.Items[]
ListBox.HideBorder ListBox.ShowBorder
ListBox.HideScrollArrows ListBox.ShowScrollArrows
ListBox.SetItemText ListBox.Items[]
ListBoxAdd ListBox.AddItem
ListBoxClear ListBox.Clear
ListBoxDirList ListBox.FillDirList
ListBoxGetItemText ListBox.Items[]
ListBoxGetNumItems ListBox.ItemCount
ListBoxGetSelected ListBox.SelectedIndex
ListBoxRemove ListBox.RemoveItem
ListBoxSaveGameList ListBox.FillSaveGameList
ListBoxSetSelected ListBox.SelectedIndex
ListBoxSetTopItem ListBox.TopItem
LoadImageFile DynamicSprite.CreateFromFile
LoadSaveSlotScreenshot DynamicSprite.CreateFromSaveGame
LoseInventory Character.LoseInventory
LoseInventoryFromCharacter Character.LoseInventory
MergeObject Object.MergeIntoBackground
MoveCharacter Character.Walk
MoveCharacterBlocking Character.Walk
MoveCharacterDirect Character.Walk
MoveCharacterPath Character.AddWaypoint
MoveCharacterStraight Character.WalkStraight
MoveCharacterToHotspot Character.Walk
MoveCharacterToObject Character.Walk
MoveObject Object.Move
MoveObjectDirect Object.Move
MoveOverlay Overlay.X
MoveToWalkableArea Character.PlaceOnWalkableArea
NewRoom Character.ChangeRoom
NewRoomEx Character.ChangeRoom
NewRoomNPC Character.ChangeRoom
Object.GetName Object.Name
Object.GetPropertyText Object.GetTextProperty
Object.IgnoreWalkbehinds design your rooms without it and rely on Object.Baseline instead 3.5.0
ObjectOff Object.Visible
ObjectOn Object.Visible
PlayAmbientSound AudioChannel.SetRoomLocation
PlayAmbientSound AudioClip.Play
PlayMP3File AudioClip.Play
PlayMusic AudioClip.Play
PlayMusicQueued AudioClip.PlayQueued
PlaySilentMIDI use AudioClip.Play command and set its Volume property to 0
PlaySound AudioClip.Play
PlaySoundEx AudioClip.Play
ProcessClick Room.ProcessClick
RawClearScreen DrawingSurface.Clear
RawDrawCircle DrawingSurface.DrawCircle
RawDrawFrameTransparent DrawingSurface.DrawSurface
RawDrawImage DrawingSurface.DrawImage
RawDrawImageResized DrawingSurface.DrawImage
RawDrawImageTransparent DrawingSurface.DrawImage
RawDrawLine DrawingSurface.DrawLine
RawDrawRectangle DrawingSurface.DrawRectangle
RawDrawTriangle DrawingSurface.DrawTriangle
RawPrint DrawingSurface.DrawString
RawPrintMessageWrapped DrawingSurface.DrawMessageWrapped
RawRestoreScreen DrawingSurface.DrawSurface
RawSaveScreen DrawingSurface.CreateCopy
RawSetColor DrawingSurface.DrawingColor
RawSetColorRGB Game.GetColorFromRGB
RefreshMouse Mouse.Update
ReleaseCharacterView Character.UnlockView
ReleaseViewport Game.Camera.AutoTracking
RemoveObjectTint Object.RemoveTint
RemoveOverlay Overlay.Remove
Room.MusicOnLoad Use AudioClip.Play on the room Load event
RunCharacterInteraction Character.RunInteraction
RunDialog Dialog.Start
RunHotspotInteraction Hotspot.RunInteraction
RunInventoryInteraction InventoryItem.RunInteraction
RunObjectInteraction Object.RunInteraction
RunRegionInteraction RunRegionInteraction
SaveCursorForLocationChange Mouse.SaveCursorUntilItLeaves
savegameindex[] ListBox.SaveGameSlots[]
SeekMIDIPosition AudioChannel.Seek
SeekMODPattern AudioChannel.Seek
SeekMP3PosMillis AudioChannel.Seek
SetActiveInventory Character.ActiveInventory
SetAreaLightLevel Region.LightLevel
SetButtonPic Button.NormalGraphic
SetButtonText Button.Text
SetChannelVolume AudioChannel.Volume
SetCharacterBaseline Character.Baseline
SetCharacterBlinkView Character.BlinkInterval
SetCharacterBlinkView Character.BlinkView
SetCharacterClickable Character.Clickable
SetCharacterFrame Character.LockViewFrame
SetCharacterIdle Character.SetIdleView
SetCharacterIgnoreLight Character.IgnoreLighting
SetCharacterIgnoreWalkbehinds design your rooms without it and rely on Character.Baseline instead 3.5.0
SetCharacterProperty Character.ManualScaling
SetCharacterProperty Character.DiagonalLoops
SetCharacterProperty Character.ScaleMoveSpeed
SetCharacterProperty Character.Solid
SetCharacterProperty Character.TurnBeforeWalking
SetCharacterSpeechView Character.SpeechView
SetCharacterSpeed Character.SetWalkSpeed
SetCharacterSpeedEx Character.SetWalkSpeed
SetCharacterTransparency Character.Transparency
SetCharacterView Character.LockView
SetCharacterViewEx Character.LockViewAligned
SetCharacterViewOffset Character.LockViewOffset
SetCursorMode Mouse.Mode
SetDefaultCursor Mouse.UseDefaultGraphic
SetDialogOption Dialog.SetOptionState
SetDigitalMasterVolume System.Volume
SetFrameSound ViewFrame.LinkedAudio
SetGlobalInt Global Variables
SetGlobalString Game.GlobalStrings
SetGraphicalVariable Global Variables
SetGUIBackgroundPic GUI.BackgroundGraphic
SetGUIClickable GUI.Clickable
SetGUIObjectEnabled GUIControl.Enabled
SetGUIObjectPosition GUIControl.SetPosition
SetGUIObjectSize GUIControl.SetSize
SetGUIPosition GUI.SetPosition
SetGUISize GUI.SetSize
SetGUITransparency GUI.Transparency
SetGUIZOrder GUI.ZOrder
SetInvDimensions InvWindow.ItemHeight
SetInvItemName InventoryItem.Name
SetInvItemPic InventoryItem.Graphic
SetLabelColor Label.TextColor
SetLabelFont Label.Font
SetLabelText Label.Text
SetMouseBounds Mouse.SetBounds
SetMouseCursor Mouse.UseModeGraphic
SetMousePosition Mouse.SetPosition
SetMusicMasterVolume System.Volume
SetMusicRepeat AudioClip.Play
SetMusicVolume AudioChannel.Volume
SetNextCursorMode Mouse.SelectNextMode
SetNormalFont Game.NormalFont
SetObjectBaseline Object.Baseline
SetObjectClickable Object.Clickable
SetObjectFrame Object.SetView
SetObjectGraphic Object.Graphic
SetObjectIgnoreWalkbehinds design your rooms without it and rely on Object.Baseline instead 3.5.0
SetObjectPosition Object.SetPosition
SetObjectTint Object.Tint
SetObjectTransparency Object.Transparency
SetObjectView Object.SetView
SetPlayerCharacter Character.SetAsPlayer
SetRegionTint Region.Tint
SetSkipSpeech Speech.SkipStyle
SetSliderValue Slider.Value
SetSoundVolume Game.SetAudioTypeVolume
SetSpeechFont Game.SpeechFont
SetSpeechStyle Speech.Style
SetTalkingColor Character.SpeechColor
SetTextBoxFont TextBox.Font
SetTextBoxText TextBox.Text
SetTextOverlay Overlay.SetText
SetViewport Game.Camera.SetAt 3.5.0
SetVoiceMode Speech.VoiceMode
ShowMouseCursor Mouse.Visible
StopAmbientSound AudioChannel.Stop
StopChannel AudioChannel.Stop
StopMoving Character.StopMoving
StopMusic Game.StopAudio
StopObjectMoving Object.StopMoving
StrCaseComp String.CompareTo
StrCat String.Append
StrComp String.CompareTo
StrContains String.IndexOf
StrCopy String.Copy
StrFormat String.Format
StrGetCharAt String.Chars[]
String.Contains String.IndexOf
StringToInt String.AsInt
StrLen String.Length
StrSetCharAt String.ReplaceCharAt
StrToLowerCase String.LowerCase
StrToUpperCase String.UpperCase
system.color_depth System.ColorDepth
system.os System.OperatingSystem
System.ScreenHeight Screen.Height 3.5.0
System.ScreenWidth Screen.Width 3.5.0
system.version System.Version
System.ViewportHeight Screen.Height 3.5.0
System.ViewportWidth Screen.Width 3.5.0
system.vsync System.Vsync
system.windowed System.Windowed
TextBox.GetText TextBox.Text
TextBox.SetText TextBox.Text
ViewFrame.Sound ViewFrame.LinkedAudio