GameDev Scripting Reference

The following is an automatically generated reference for using VBScript with The Scrolling Game Development Kit. The source code for the generator is included with the GameDev source code package in the TLBHelp directory (it's a VB Program). Because it is automatically generated from the type library of GameDev.exe, the information is very basic, and may not be complete enough to be useful in some cases. Furthermore, this document is intended only as a reference for someone who knows what he or she is doing at a high level. For a more basic understanding of how to write scripts, see the Scripting Docutorial, the end of the complete GameDev tutorial and the sample scripts included with the install.

It is helpful to understand the following conventions in the syntax columns below:

Contents

Objects

Enumerations

AnimDef Object

Animated tile definition. Indexed and owned by project.

Properties

NameTypeDescriptionSyntax
BaseTile ByteThe tile value to become animated[Let] MyByte = oAnimDef.BaseTile
[Let] oAnimDef.BaseTile = MyByte
CurTile ByteReturns the tile index associated with the current frame[Let] MyByte = oAnimDef.CurTile
FrameDelay ByteHow many screen updates will a particular cell be displayed.[Let] MyByte = oAnimDef.FrameDelay(Index Integer)
[Let] oAnimDef.FrameDelay(Index Integer) = MyByte
FrameValue ByteIndex of the tile to be displayed in a particular animation cell.[Let] MyByte = oAnimDef.FrameValue(Index Integer)
[Let] oAnimDef.FrameValue(Index Integer) = MyByte
LayerName StringName of the layer to which the animation applies[Let] MyString = oAnimDef.LayerName
[Let] oAnimDef.LayerName = MyString
MapName StringName of the map to which the animated tile applies[Let] MyString = oAnimDef.MapName
[Let] oAnimDef.MapName = MyString
Name StringName of the AnimDef object as indexed by the project[Let] MyString = oAnimDef.Name
[Let] oAnimDef.Name = MyString

Methods

NameReturnDescriptionSyntax
Advance Advance this animation by one timer frame (may result in same display frame for delay above 1). oAnimDef.Advance
Clone AnimDef Create a copy of the AnimDef Set My_AnimDef = oAnimDef.Clone
CopyFrom Acts as an assignment operator oAnimDef.CopyFrom(Def AnimDef)
Deserialize Convert AnimDef text from the project file into an AnimDef object oAnimDef.Deserialize(Data String)
FrameCount Integer The number of animation cells [Let] MyInteger = oAnimDef.FrameCount
InsertFrame Insert a new frame (cell) into the animation sequence before BeforeIndex. oAnimDef.InsertFrame(BeforeIndex Integer, Value Byte, Delay Byte)
RemoveFrame Remove a frame (cell) from the animation sequence, shifting subsequent frames and delays back. oAnimDef.RemoveFrame(Index Integer)
Reset Reset the current frame to the beginning of the animation. oAnimDef.Reset
Serialize String Return the contents of the AnimDef object as text that can be put into the project file. [Let] MyString = oAnimDef.Serialize

Category Object

Tile category. Indexed by Tileset and owned by the project.

Properties

NameTypeDescriptionSyntax
Group TileGroupThe group of tiles indexes that make up this named category of tileset tiles.Set My_TileGroup = oCategory.Group
Set oCategory.Group = My_TileGroup
Name StringName for this category as indexed by the project for a particular tileset.[Let] MyString = oCategory.Name
[Let] oCategory.Name = MyString
TSName StringName of the tileset whose tiles are being categorized.[Let] MyString = oCategory.TSName
[Let] oCategory.TSName = MyString

Methods

NameReturnDescriptionSyntax
Deserialize Convert text from the project file into a Category object. oCategory.Deserialize(Data String)
GetIndex Integer Find the ordinal position of this Category as indexed by Project.GroupByIndex. [Let] MyInteger = oCategory.GetIndex
GetIndexByTileset Integer Find the ordinal position of this category as indexed by Project.TilesetGroupByIndex. [Let] MyInteger = oCategory.GetIndexByTileset(TSName String)
Serialize String Return the contents of the Category as a string for the project file. [Let] MyString = oCategory.Serialize

CollisionDef Object

Definition of what collisions are interesting and how to react. Indexed and owned by map.

Properties

NameTypeDescriptionSyntax
ClassA IntegerNumber 0 to 15 indicating the collision class of the first part.[Let] MyInteger = oCollisionDef.ClassA
[Let] oCollisionDef.ClassA = MyInteger
ClassB IntegerNumber 0 to 15 indicating the collision class of the second part.[Let] MyInteger = oCollisionDef.ClassB
[Let] oCollisionDef.ClassB = MyInteger
Flags ByteHow to react to the collision (see eCollisionFlags).[Let] MyByte = oCollisionDef.Flags
[Let] oCollisionDef.Flags = MyByte
InvFlags ByteIndicates how the collision relates to inventory (see eCollInvFlags).[Let] MyByte = oCollisionDef.InvFlags
[Let] oCollisionDef.InvFlags = MyByte
InvItem ByteWhich inventory item is related to the collision[Let] MyByte = oCollisionDef.InvItem
[Let] oCollisionDef.InvItem = MyByte
InvUseCount IntegerHow many inventory items are required to alter the collisions effect.[Let] MyInteger = oCollisionDef.InvUseCount
[Let] oCollisionDef.InvUseCount = MyInteger
Media StringName of media clip to play on collision[Let] MyString = oCollisionDef.Media
[Let] oCollisionDef.Media = MyString
SpecialFunction StringIndicates a special function to execute when the collision occurs.[Let] MyString = oCollisionDef.SpecialFunction
[Let] oCollisionDef.SpecialFunction = MyString

Methods

NameReturnDescriptionSyntax
Load Reads data from a binary file to construct a CollisionDef. oCollisionDef.Load(FNum Integer)
Save Writes the CollisionDef to a binary file. oCollisionDef.Save(FNum Integer)

eActionBits Enumeration

Members

NameValue
ACTION_UP1
ACTION_LEFT2
ACTION_RIGHT4
ACTION_DOWN8
ACTION_BUTTON116
ACTION_BUTTON232
ACTION_BUTTON364
ACTION_BUTTON4128

eCollInvFlags Enumeration

Members

NameValue
COLL_INV_REQUIRE1
COLL_INV_REMOVE2

eCollisionFlags Enumeration

Members

NameValue
COLL_PLATFORM1
COLL_SWAPVEL2
COLL_ASTOP4
COLL_ATERM8
COLL_ANEW16
COLL_BSTOP32
COLL_BTERM64
COLL_BNEW128
COLL_AREPELBMASK58
COLL_BREPELAMASK198

eControlType Enumeration

Members

NameValue
CONTROL_APPROX_PATH1
CONTROL_EXACT_PATH2
CONTROL_INPUT3
CONTROL_FOLLOWNEAR4
CONTROL_FOLLOWPLAYER5
CONTROL_FOLLOWFLATFLOOR6
CONTROL_FOLLOWSLOPEFLOOR7
CONTROL_FOLLOWFLATWALL8
CONTROL_FOLLOWLEFTWALL9
CONTROL_FOLLOWRIGHTWALL10
CONTROL_SLOPEFLOORJUMP11
CONTROL_INERT12
CONTROL_SIMPLE13
CONTROL_PATHVECTOR14
CONTROL_PATHRANDOMDIR15
CONTROL_PATHRANDOMPOINTS16
CONTROL_STRICTRANDOMDIR17
CONTROL_STRICTRANDOMPOINTS18

eDefFlagBits Enumeration

Members

NameValue
FLAG_INSTANCE1
FLAG_RELATIVE_PATH2

Engine Object

The only class directly externally creatable by COM; intended as the main access point for COM. Ensures created objects are from same instance.

Properties

NameTypeDescriptionSyntax
CurrentDisplay ObjectReturns the global reference to the current full screen display object if it is open.[Let] MyObject = oEngine.CurrentDisplay
GameDevForm ObjectReturns a form object from GameDev's user interface.[Let] MyObject = oEngine.GameDevForm(Name String)
HostObj ScriptHostReturn the GameDev global scripting host object.Set My_ScriptHost = oEngine.HostObj
ProjectObj GameProjectReturn the GameDev global project object.Set My_GameProject = oEngine.ProjectObj

Methods

NameReturnDescriptionSyntax
GetGameDevObj Object Return an object based on the name given as a string. [Let] MyObject = oEngine.GetGameDevObj(ObjName String)
NewAnimDef AnimDef Create a new AnimDef in the current instance of GameDev and return it. Set My_AnimDef = oEngine.NewAnimDef
NewCollisionDef CollisionDef Create a new CollisionDef in the current instance of GameDev and return it. Set My_CollisionDef = oEngine.NewCollisionDef
NewGameDevObj Object Create a new object in the current instance of GameDev, given the type name as a string, and return it. [Let] MyObject = oEngine.NewGameDevObj(ObjType String)
NewInteraction Interaction Create a new Interaction in the current instance of GameDev and return it. Set My_Interaction = oEngine.NewInteraction
NewMap Map Create a new Map in the current instance of GameDev and return it. Set My_Map = oEngine.NewMap
NewMapEdit MapEdit Create a new MapEdit in the current instance of GameDev and return it. Set My_MapEdit = oEngine.NewMapEdit
NewMapInteract MapInteract Create a new MapInteract in the current instance of GameDev and return it. Set My_MapInteract = oEngine.NewMapInteract
NewMatchDef MatchDef Create a new MatchDef in the current instance of GameDev and return it. Set My_MatchDef = oEngine.NewMatchDef
NewPath Path Create a new Path in the current instance of GameDev and return it. Set My_Path = oEngine.NewPath
NewPlayer Variant Create a new Player object in the current instance of GameDev and return it. [Let] MyVariant = oEngine.NewPlayer
NewSpecialFunction SpecialFunction Create a new SpecialFunction in the current instance of GameDev and return it. Set My_SpecialFunction = oEngine.NewSpecialFunction
NewSprite Sprite Create a new Sprite in the current instance of GameDev and return it. Set My_Sprite = oEngine.NewSprite
NewSpriteDef SpriteDef Create a new SpriteDef in the current instance of GameDev and return it. Set My_SpriteDef = oEngine.NewSpriteDef
NewSpriteTemplate SpriteTemplate Create a new SpriteTemplate in the current instance of GameDev and return it. Set My_SpriteTemplate = oEngine.NewSpriteTemplate
NewTileEdit TileEdit Create a new TileEdit in the current instance of GameDev and return it. Set My_TileEdit = oEngine.NewTileEdit
NewTileGroup TileGroup Create a new TileGroup in the current instance of GameDev and return it. Set My_TileGroup = oEngine.NewTileGroup
NewTileMatch Variant Create a new TileMatch in the current instance of GameDev and return it. [Let] MyVariant = oEngine.NewTileMatch

eStateType Enumeration

Members

NameValue
STATE_SINGLE1
STATE_LEFT_RIGHT2
STATE_8_DIRECTION3
STATE_36_DIRECTION4

eTemplateFlagBits Enumeration

Members

NameValue
FLAG_ACCELSTATES1
FLAG_RESETONSTOP2
FLAG_UPNEEDSSOLID4
FLAG_ANIMVELOCITY8
FLAG_ANIMVELDRIFT16
FLAG_AUTODEL_MAP32
FLAG_AUTODEL_DISP64
FLAG_AUTODEL_MOTIONLESS96
FLAG_AUTODEL_MASK96
FLAG_EOP_RESET128
FLAG_EOP_DELETE256
FLAG_EOP_ACTIVATEFUNCS384
FLAG_EOP_MASK384
FLAG_AUTODEL_SOLID512
FLAG_AUTODEL_MASK_V14608

GameProject Object

Through this object, all aspects of a project (all maps & graphics etc) are accessible. Get instance with Engine.ProjectObj.

Properties

NameTypeDescriptionSyntax
AnimDefCount IntegerReturn the number of AnimDefs in the project[Let] MyInteger = oGameProject.AnimDefCount
AnimDefExists BooleanReturn True if an AnimDef with the specified Name or ordinal index exists in the project.[Let] MyBoolean = oGameProject.AnimDefExists(Key Variant)
AnimDefs AnimDefReturn an AnimDef based on its name or 0-based index in the project.Set My_AnimDef = oGameProject.AnimDefs(Key Variant)
bSplashShowing BooleanReturns True if the spash screen is still showing from initial startup.[Let] MyBoolean = oGameProject.bSplashShowing
[Let] oGameProject.bSplashShowing = MyBoolean
FileVer SingleFile format version of the GDP file when it was loaded.[Let] MySingle = oGameProject.FileVer
[Let] oGameProject.FileVer = MySingle
GamePlayer PlayerReturns the single Player object for the project.Set My_Player = oGameProject.GamePlayer
Set oGameProject.GamePlayer = My_Player
IsDirty BooleanReturns True if the project data (strictly that stored in the GDP) has changed.[Let] MyBoolean = oGameProject.IsDirty
[Let] oGameProject.IsDirty = MyBoolean
LoadingScreen StringRelative path to the graphic that appears on the loading screen. Empty string for no loading screen.[Let] MyString = oGameProject.LoadingScreen
[Let] oGameProject.LoadingScreen = MyString
MapCount IntegerReturn the number of Map objects in the project.[Let] MyInteger = oGameProject.MapCount
MapExists BooleanReturn True if a map by the specified name or ordinal index exists.[Let] MyBoolean = oGameProject.MapExists(Key Variant)
Maps MapReturn a map given its name or ordinal index in the project.Set My_Map = oGameProject.Maps(Key Variant)
MatchDefCount IntegerReturn the number of MatchDef objects in the project.[Let] MyInteger = oGameProject.MatchDefCount
MatchDefs MatchDefReturn a MatchDef object given its name or ordinal index in the project.Set My_MatchDef = oGameProject.MatchDefs(Key Variant)
MediaMgr MediaManagerReturn the single MediaManager object for the current project.Set My_MediaManager = oGameProject.MediaMgr
Set oGameProject.MediaMgr = My_MediaManager
ProjectPath StringReturn or set the path to the GDP plain text project file.[Let] MyString = oGameProject.ProjectPath
[Let] oGameProject.ProjectPath = MyString
TileSetDef TileSetDefReturn a TileSetDef given its name or ordinal index in the project.Set My_TileSetDef = oGameProject.TileSetDef(Key Variant)
TileSetDefCount IntegerReturn the number of TileSetDef objects in the project.[Let] MyInteger = oGameProject.TileSetDefCount

Methods

NameReturnDescriptionSyntax
AddAnim Add a new AnimDef to the project. oGameProject.AddAnim(A AnimDef)
AddGroup Category Add a new Category to the project. Set My_Category = oGameProject.AddGroup(GroupName String, TilesetName String)
AddMap Add a new Map to the project oGameProject.AddMap(M Map)
AddMatch Add a new MatchDef to the project oGameProject.AddMatch(M MatchDef)
AddSolidDef SolidDef Add a new SolidDef to the project. Set My_SolidDef = oGameProject.AddSolidDef(SolidDefName String, TilesetName String)
AddTileSet TileSetDef Add a new TileSetDef to the project. Set My_TileSetDef = oGameProject.AddTileSet(ImagePath String, TileWidth Integer, TileHeight Integer, Name String)
DeleteSave Delete the save game data in save slot by the specified name (created by SaveRuntime). oGameProject.DeleteSave(strSaveName Variant)
ExportXML String Export project and map data into an XML string (no images or multimedia) [Let] MyString = oGameProject.ExportXML
GetApplicableTileMatch MatchDef Find and return the Nth MatchDef for the specified tileset where N=Index. Set My_MatchDef = oGameProject.GetApplicableTileMatch(TSDef TileSetDef, Index Integer)
GetApplicableTileMatchCount Integer Return the number of MatchDef objects that apply to the specified tileset. [Let] MyInteger = oGameProject.GetApplicableTileMatchCount(TSDef TileSetDef)
GroupByIndex Category Return a Category object by ordinal position in the list of all Category objects in the project. Set My_Category = oGameProject.GroupByIndex(Index Integer)
GroupByTilesetCount Integer Return the number of Category objects in the project for the specified tileset name. [Let] MyInteger = oGameProject.GroupByTilesetCount(TileSetKey String)
GroupCount Integer Return the total number of Category objects in the project. [Let] MyInteger = oGameProject.GroupCount
GroupExists Boolean Return True if a Category by the specified name exists for the specified tileset. [Let] MyBoolean = oGameProject.GroupExists(GroupName String, TilesetName String)
Groups Category Returns the Category object by the specified name for the specified tileset. Set My_Category = oGameProject.Groups(GroupName String, TilesetName String)
ImportXML Boolean Import project and map data from XML string generated by ExportXML [Let] MyBoolean = oGameProject.ImportXML(strXML String)
Load Load a GDP plain text project file and all dependent map files into memory. oGameProject.Load(FileName String)
LoadRuntime Load a saved running game state. oGameProject.LoadRuntime(strLoadName String)
RemoveAnim Remove an AnimDef given its name or ordinal position in the project. oGameProject.RemoveAnim(Key Variant)
RemoveGroup Remove a Category from the project given its name and Tileset name. oGameProject.RemoveGroup(GroupName String, TilesetName String)
RemoveMap Remove a Map given its name or ordinal position in the project. oGameProject.RemoveMap(Key Variant)
RemoveMatch Remove a MatchDef given its name or ordinal position in the project. oGameProject.RemoveMatch(Key Variant)
RemoveSolidDef Remove a SolidDef from the project given a reference to it. oGameProject.RemoveSolidDef(Item SolidDef)
RemoveTileSet Remove a TileSetDef given its name or ordinal position in the project. oGameProject.RemoveTileSet(Key Variant)
Save Save the project to a plain text file, and all dependent maps and tileset images to their respective files. oGameProject.Save(FileName String)
SaveRuntime Save the current state of the running game to a specified name. oGameProject.SaveRuntime(strSaveName String)
SetLoadingStatus This is called during the project load process to update the apearance of the loading screen. oGameProject.SetLoadingStatus(strStatus String[, TotalPercent Integer])
SolidDefByTilesetCount Integer Return the number of SolidDefs for the specified Tileset. [Let] MyInteger = oGameProject.SolidDefByTilesetCount(TilesetName String)
SolidDefCount Integer Return the total number of SolidDef objects in the project. [Let] MyInteger = oGameProject.SolidDefCount
SolidDefExists Boolean Return true if the specified SolidDef exists for the named tileset. [Let] MyBoolean = oGameProject.SolidDefExists(SolidDefName String, TilesetName String)
SolidDefIndexByTileset Integer Return the Nth SolidDef object for the named tileset where N=Index. [Let] MyInteger = oGameProject.SolidDefIndexByTileset(TilesetName String, Index Integer)
SolidDefs SolidDef Return the named SolidDef object for the specified TileSetDef. Set My_SolidDef = oGameProject.SolidDefs(SolidDefName String, TilesetName String)
SolidDefsByIndex SolidDef Return a SolidDef object based on its ordinal index of all SolidDefs in the project. Set My_SolidDef = oGameProject.SolidDefsByIndex(Index Integer)
TilesetGroupByIndex Category Find and return the Nth Category for the specified TileSetDef where N=Index. Set My_Category = oGameProject.TilesetGroupByIndex(TileSetKey String, Index Integer)
TriggerEditMap Raises the OnEditMap event. oGameProject.TriggerEditMap(Mp MapEdit)
TriggerGeneric Raises the GenericEvent event. oGameProject.TriggerGeneric(Data Variant)
TriggerTileEdit Raises the OnEditTileset event. oGameProject.TriggerTileEdit(TE TileEdit)
Validate String Returns an empty string if the project looks valid, otherwise a string describing errors (ie. missing sprite states). [Let] MyString = oGameProject.Validate
WaitForSplash Wait for the splash screen to disappear, then return. oGameProject.WaitForSplash

Events

NameDescriptionSyntax
GenericEvent For future expansion or extensibility (see TriggerGeneric method). Sub oGameProject_GenericEvent(Data Variant)
OnEditMap Event raised when the map editor is displayed (see also TriggerEditMap). Sub oGameProject_OnEditMap(Mp MapEdit)
OnEditTileset Event raised when tileset editor starts (see also TriggerTileEdit). Sub oGameProject_OnEditTileset(TE TileEdit)

Interaction Object

Indicates how the player interacts with a particular category of map tiles with respect to inventory. Indexed and owned by map.

Properties

NameTypeDescriptionSyntax
ActivateFunction StringName of the function to be activated by this tile interaction (shared with Media property; same value).[Let] MyString = oInteraction.ActivateFunction
[Let] oInteraction.ActivateFunction = MyString
Flags IntegerContains a set of InteractionFlags that control aspects of the interaction (see InteractionFlags enum).[Let] MyInteger = oInteraction.Flags
[Let] oInteraction.Flags = MyInteger
InvItem ByteThe inventory item involved in this interaction.[Let] MyByte = oInteraction.InvItem
[Let] oInteraction.InvItem = MyByte
Media StringName of media clip to play on tile interaction (shared with ActivateFunction property; same value).[Let] MyString = oInteraction.Media
[Let] oInteraction.Media = MyString
Quantity IntegerThe inventory quantity affected by this tile interaction.[Let] MyInteger = oInteraction.Quantity
[Let] oInteraction.Quantity = MyInteger
Reaction Enum TileReactionsHow the inventory interacts with this event (see TileReactions enum).[Let] MyTileReactions = oInteraction.Reaction
[Let] oInteraction.Reaction = MyTileReactions
ReplaceTile ByteThe new tile index that will appear on the map layer after this interaction.[Let] MyByte = oInteraction.ReplaceTile
[Let] oInteraction.ReplaceTile = MyByte
TouchCategory CategoryWhich tiles trigger this interaction when touched.Set My_Category = oInteraction.TouchCategory
Set oInteraction.TouchCategory = My_Category

Methods

NameReturnDescriptionSyntax
Load Load an Interaction from a binary file. oInteraction.Load(nFileNum Integer)
Save String Write the Interaction object to a binary file. [Let] MyString = oInteraction.Save(nFileNum Integer)

InteractionFlags Enumeration

Members

NameValue
INTFL_INITIALTOUCH1
INTFL_REMOVEIFACT2
INTFL_REMOVEALWAYS4
INTFL_RAISEEVENT8
INTFL_ACTONUP16
INTFL_ACTONBUTTON32
INTFL_ACTONDOWN64
INTFL_ALLBUTTONS112
INTFL_SWAPCONTROL128
INTFL_NEWINSTANCE256
INTFL_DELETEOLD512
INTFL_OLDLOCATION1024
INTFL_OVERRIDEPOSITION128
INTFL_RELATIVETELEPORT128
INTFL_RELATIVETOPLAYER256
INTFL_CHANGEBGMEDIA2048
INTFL_STOPMEDIA4096
INTFL_FUNCREMOVEINV8192
INTFL_ACTONSTARTUP16384
INTFL_DELETEMANY128
INTFL_ALTINVRESET128
INTFL_RETAINSTATE-32768
INTFL_REMEMBER_SPRITES256
INTFL_REMEMBER_MAP1024
INTFL_LOADGAME128
INTFL_CHECK_EXIST256
INTFL_IF_NOT_EXIST128
INTFL_DELETE_GAME512
INTFL_ACTIVATE_FUNCTION128
INTFL_RELATIVETOTRIGGER512

InteractionFlags2 Enumeration

Members

NameValue
INTFL2_ALLATONCE1
INTFL2_ACTONBUTTON22
INTFL2_ACTONBUTTON34
INTFL2_ACTONBUTTON48
INTFL2_ACTONLEFT128
INTFL2_ACTONRIGHT256
INTFL2_ALLBUTTONS398
INTFL2_GLOBAL16
INTFL2_NOTHINGELSE32
INTFL2_INITIALPRESSONLY64

Layer Object

One scrolling layer of a map. Indexed and owned by map.

Properties

NameTypeDescriptionSyntax
ClsMbrCnt IntegerHow many sprites are in a collision class (for collision optimization). Set by Map.AdvanceSprites.[Let] oLayer.ClsMbrCnt(Index Integer) = MyInteger
[Let] MyInteger = oLayer.ClsMbrCnt(Index Integer)
Columns IntegerThe width of the layer in tiles.[Let] MyInteger = oLayer.Columns
Data IBMDXTileMapReturn the underlying BMDXMap object containing the tiles.Set MyIBMDXTileMap = oLayer.Data
Set oLayer.Data = MyIBMDXTileMap
Name StringThe name of this layer as indexed by the Map.[Let] MyString = oLayer.Name
[Let] oLayer.Name = MyString
pMap MapReference to the map in which this layer exists.Set My_Map = oLayer.pMap
Set oLayer.pMap = My_Map
Rows IntegerReturn the height of the layer in tiles.[Let] MyInteger = oLayer.Rows
Sprite SpriteReturn a sprite given its ordinal index in the layer.Set My_Sprite = oLayer.Sprite(nIndex Integer)
TileAnimColl _CollectionThe collection of AnimDefs applicable to the layer, initialized with LoadTileAnims.Set My_Collection = oLayer.TileAnimColl
Set oLayer.TileAnimColl = My_Collection
Tileset IBMDXTileSetThe BMDXTileset object (display memory) containing this layer's tile graphics.Set MyIBMDXTileSet = oLayer.Tileset
Set oLayer.Tileset = MyIBMDXTileSet
Transparent BooleanDetermines whether the background of the layer (background color of the tileset) is drawn.[Let] MyBoolean = oLayer.Transparent
[Let] oLayer.Transparent = MyBoolean
TSDef TileSetDefThe TileSetDef object used to create and maintain the tileset for this layer's graphics.Set My_TileSetDef = oLayer.TSDef
Set oLayer.TSDef = My_TileSetDef
XScrollRate SingleValue indicating how fast this layer scrolls horizontally relative to the map (layer pixels per map pixel; may be non-integer).[Let] MySingle = oLayer.XScrollRate
[Let] oLayer.XScrollRate = MySingle
YScrollRate SingleValue indicating how fast this layer scrolls vertically relative to the map (layer pixels per map pixel; may be non-integer).[Let] MySingle = oLayer.YScrollRate
[Let] oLayer.YScrollRate = MySingle

Methods

NameReturnDescriptionSyntax
AddSprite Add a new Sprite object to this layer, to be drawn by DrawLayerSprites. oLayer.AddSprite(Spr Sprite)
AdvanceTileAnims Process all AnimDefs for this layer (animate the tiles). oLayer.AdvanceTileAnims
CheckSpriteCollisions Find, process and react to sprite collisions out of all this layer's sprites. oLayer.CheckSpriteCollisions
ClearSprites Remove all sprites from the layer. oLayer.ClearSprites
Create Initialize the layer object's essential data. oLayer.Create(LayerName String, PixWidth Long, PixHeight Long, TS TileSetDef, XR Single, YR Single, Trans Boolean, Mp Map)
DrawLayerSprites Draw all this layer's sprites to the map's current display according to the specified map scroll position. oLayer.DrawLayerSprites(MapXOffset Long, MapYOffset Long)
DrawSprite Draw a single sprite object to this layer's map's display given the map's scroll position, accounting for the layer's scroll rate. oLayer.DrawSprite(Spr Sprite, MapXOffset Long, MapYOffset Long)
IsLoaded Boolean Returns True if the layer's tileset is loaded [Let] MyBoolean = oLayer.IsLoaded
LoadTileAnims Initializes tile animation for the layer based on the project's AnimDefs. oLayer.LoadTileAnims
LoadTiles Load the graphics for this layer's tileset into display memory, or locate an existing copy. oLayer.LoadTiles(Disp IBMDXDisplay3)
ReleaseRefs Release all references that the layer has to other objects to avoid circular reference problems. oLayer.ReleaseRefs
RemoveSprite Remove a sprite from the layer's collection of active sprites. oLayer.RemoveSprite(nIndex Integer)
SpriteCount Integer Return the number of active sprites in the layer. [Let] MyInteger = oLayer.SpriteCount
TestForCollision Test a specific CollisionDef given two applicable sprites. If they are colliding, take appropriate action. oLayer.TestForCollision(ClsASprIdx Integer, ClsBSprIdx Integer, CollDefIdx Integer)
TileRectHit Boolean Determine if two sprite's rectangles overlap (used for detecting collision with a platform). [Let] MyBoolean = oLayer.TileRectHit(TileSet1 IBMDXTileSet, TileSet2 IBMDXTileSet, DX Integer, DY Integer)
UnloadTiles Releases the layer's reference to the BMDXTileset object. oLayer.UnloadTiles
UpdateLayer Update the layer to a new set of parameters, changing the size and cropping if necessary. oLayer.UpdateLayer(LayerName String, PixWidth Long, PixHeight Long, TS TileSetDef, XR Single, YR Single, Trans Boolean)

Map Object

Map, corresponds mainly to one MAP file. Indexed and owned by project.

Properties

NameTypeDescriptionSyntax
BackgroundColor LongSpecifies the color behind the inventory (if it's not over the map) and elsewhere around the map when this map is displayed.[Let] MyLong = oMap.BackgroundColor
[Let] oMap.BackgroundColor = MyLong
BackgroundMusic StringName of the MediaClip containing the background music for this map.[Let] MyString = oMap.BackgroundMusic
[Let] oMap.BackgroundMusic = MyString
bActive BooleanDetermines whether the map is updating. (Auto set to False when display is minimized.)[Let] MyBoolean = oMap.bActive
[Let] oMap.bActive = MyBoolean
bDisablePlayerEdit BooleanTrue if the player sprite is being prevented from altering the map (ie, in map editor).[Let] MyBoolean = oMap.bDisablePlayerEdit
[Let] oMap.bDisablePlayerEdit = MyBoolean
CollClassName StringGet or set the name of one of the 16 collision classes for sprites.[Let] oMap.CollClassName(Index Integer) = MyString
[Let] MyString = oMap.CollClassName(Index Integer)
CollDefCount IntegerReturn the number of collision definitions for sprites on the map.[Let] MyInteger = oMap.CollDefCount
CollDefs CollisionDefReturn a CollisionDef object given its ordinal index in the Map.Set My_CollisionDef = oMap.CollDefs(Index Integer)
Disp IBMDXDisplay3BMDXDisplay object being used by this map if it's active.Set MyIBMDXDisplay3 = oMap.Disp
Set oMap.Disp = MyIBMDXDisplay3
DisplayInventory TileGroupIndicates the indexes of which inventory items are displayed when this map is active.Set My_TileGroup = oMap.DisplayInventory
Set oMap.DisplayInventory = My_TileGroup
InteractCount IntegerReturn the number of Interaction definitions for this map.[Let] MyInteger = oMap.InteractCount
Interactions InteractionReturn or set an interaction object in the map according to it's ordinal index.Set My_Interaction = oMap.Interactions(Index Integer)
Set oMap.Interactions(Index Integer) = My_Interaction
IsDirty BooleanReturns true if map data has changed.[Let] MyBoolean = oMap.IsDirty
[Let] oMap.IsDirty = MyBoolean
LayerCount IntegerReturn the number of layers in the map.[Let] MyInteger = oMap.LayerCount
LayerExists BooleanReturn True if the specified layer name or index exists in the map.[Let] MyBoolean = oMap.LayerExists(Key Variant)
MapHeight LongGet or set the height of the total map area in pixels (doesn't update layers).[Let] MyLong = oMap.MapHeight
[Let] oMap.MapHeight = MyLong
MapLayer LayerReturn the layer by it's ordinal index in the map.Set My_Layer = oMap.MapLayer(Index Variant)
MapWidth LongGet or set the width of the total map area in pixels (doesn't update layers).[Let] MyLong = oMap.MapWidth
[Let] oMap.MapWidth = MyLong
Name StringThe name of this Map object as indexed by the project.[Let] MyString = oMap.Name
[Let] oMap.Name = MyString
Path StringThe path of the binary map file for this map.[Let] MyString = oMap.Path
[Let] oMap.Path = MyString
PathCount IntegerReturn the total number of Path objects in this map.[Let] MyInteger = oMap.PathCount
Paths PathReturn a Path object given its name or ordinal index in the map.Set My_Path = oMap.Paths(Key Variant)
PlayerSpriteName StringIdentifies the player SpriteDef object by name.[Let] MyString = oMap.PlayerSpriteName
[Let] oMap.PlayerSpriteName = MyString
SpecialCount IntegerReturn the number of SpecialFunctions in the map.[Let] MyInteger = oMap.SpecialCount
Specials SpecialFunctionReturn a SpecialFunction given its name or ordinal index in the Map.Set My_SpecialFunction = oMap.Specials(Key Variant)
SpriteDefCount IntegerReturn the number of SpriteDef objects in the map.[Let] MyInteger = oMap.SpriteDefCount
SpriteDefExists BooleanReturn True if the SpriteDef name or index exists in the Map.[Let] MyBoolean = oMap.SpriteDefExists(Key Variant)
SpriteDefs SpriteDefReturn a SpriteDef object given its name or ordinal Index in the map.Set oMap.SpriteDefs(Key Variant) = My_SpriteDef
Set My_SpriteDef = oMap.SpriteDefs(Key Variant)
SpriteTemplateCount IntegerReturn the number of SpriteTemplate objects in the map.[Let] MyInteger = oMap.SpriteTemplateCount
SpriteTemplateExists BooleanReturn True if the SpriteTemplate name or index exists in the Map.[Let] MyBoolean = oMap.SpriteTemplateExists(Key Variant)
SpriteTemplates SpriteTemplateReturn a SpriteTemplate given its name or ordinal index in the Map.Set My_SpriteTemplate = oMap.SpriteTemplates(Key Variant)
Set oMap.SpriteTemplates(Key Variant) = My_SpriteTemplate
ViewHeight IntegerGet/Set the height of the map window.[Let] MyInteger = oMap.ViewHeight
[Let] oMap.ViewHeight = MyInteger
ViewLeft IntegerGet/Set the position of the map window.[Let] MyInteger = oMap.ViewLeft
[Let] oMap.ViewLeft = MyInteger
ViewTop IntegerGet/Set the position of the map window.[Let] MyInteger = oMap.ViewTop
[Let] oMap.ViewTop = MyInteger
ViewWidth IntegerGet/Set the width of the map window.[Let] MyInteger = oMap.ViewWidth
[Let] oMap.ViewWidth = MyInteger

Methods

NameReturnDescriptionSyntax
AddCollDef Add a new CollDef object to the map. oMap.AddCollDef(CollDef CollisionDef)
AddInteraction Add a new Interaction to the map. oMap.AddInteraction(InteractionObj Interaction)
AddLayer Add a new Layer to the map with the specified parameters. oMap.AddLayer(Name String, TS String, XR Single, YR Single, Trans Boolean)
AddPath Add a new Path to the map. oMap.AddPath(P Path)
AddSpecial Add a new SpecialFunction to the map. oMap.AddSpecial(SpecFunc SpecialFunction)
AddSpriteDef Add a new SpriteDef to the map. oMap.AddSpriteDef(SD SpriteDef)
AddSpriteTemplate Add a new SpriteTemplate to the map. oMap.AddSpriteTemplate(Template SpriteTemplate)
AdvanceSprites Move all sprites on all layers of this map according to their movement definitions. oMap.AdvanceSprites
ChangeScreenTile Change the tile on a particular layer beneath a particular coordinate on the screen given the map's scroll position. oMap.ChangeScreenTile(XOff Long, YOff Long, X Integer, Y Integer, LayerIndex Integer, TileVal Byte)
CheckSpriteCollisions Check for and process all sprite collisions on all layers of the map. oMap.CheckSpriteCollisions
Deserialize Load the map's parameters from a string as stored in the GDP file. oMap.Deserialize(Data String)
DeserializeRuntime Parses data from the .sav saved game data file to reconstruct running state. oMap.DeserializeRuntime(Data String)
Draw Draw all layer tiles and sprites according to the scroll offset and map view position. oMap.Draw(XOffset Long, YOffset Long[, bAdvanceTileAnims Boolean = True])
InitSprites Initialize all this map's sprites, creating Sprites from SpriteDefs. oMap.InitSprites
Load Load a complete binary map file into memory. oMap.Load(FileName String)
LoadTileAnims Initialize tile animation (AnimDef) on all layers of the map. oMap.LoadTileAnims
LoadTiles Load the tilesets for all sprites and layers of this map into display memory. oMap.LoadTiles
PathExists Boolean Return True if the specified Path object name or index exists in this map. [Let] MyBoolean = oMap.PathExists(Key Variant)
ReleaseLayerRefs Release the references all layers have to other objects to avoid circular reference problems. oMap.ReleaseLayerRefs
ReleaseRefs Release references this map has to other objects to avoid circular reference problems. oMap.ReleaseRefs
ReleaseSpriteRefs Release references all SpriteDefs in the map have to other objects to avoid circular reference problems. oMap.ReleaseSpriteRefs
ReleaseSpriteTemplateRefs Release references all SpriteTemplates in the map have to other objects to avoid circular reference problems. oMap.ReleaseSpriteTemplateRefs
RemoveCollDef Remove a CollisionDef object from the map. oMap.RemoveCollDef(Index Integer)
RemoveInteraction Remove an Interaction object from the map oMap.RemoveInteraction(Index Integer)
RemoveLayer Remove a layer and all related Paths, SpriteDefs and SpecialFunctions from the map. oMap.RemoveLayer(Key Variant)
RemovePath Remove a Path and all related SpriteDefs from the map. oMap.RemovePath(Key Variant)
RemoveSpecial Remove a SpecialFunction from the map. oMap.RemoveSpecial(Key Variant)
RemoveSpriteDef Remove a SpriteDef object from the map. oMap.RemoveSpriteDef(Key Variant)
RemoveSpriteTemplate Remove a SpriteTemplate object from the map. oMap.RemoveSpriteTemplate(Key Variant)
Save Variant Write a map file containing all the binary map-related data. [Let] MyVariant = oMap.Save(FileName String)
ScreenToTile Boolean Calculate a tile's row and column in the layer from a pixel coordinate on the screen and the scroll position of the map. [Let] MyBoolean = oMap.ScreenToTile(XOff Long, YOff Long, X Integer, Y Integer, LayerIndex Integer, Col Integer, Row Integer)
Serialize String Store the map's parameters to a plain text string for the GDP project file. [Let] MyString = oMap.Serialize
SerializeRuntime String Serializes data into a string for a runtime saved game file. [Let] MyString = oMap.SerializeRuntime
ShiftLayer Move a layer in front of or behind other layers. (Positive Dir = foreground.) oMap.ShiftLayer(Index Integer, Dir Integer)
SortSpecialFunctions Puts all touch-sensitive functions first for optimal and correct processing at runtime. oMap.SortSpecialFunctions
SpecialExists Boolean Return True if the SpecialFunction name or index exists in the map. [Let] MyBoolean = oMap.SpecialExists(Key Variant)
UnloadTiles Remove from memory and display memory all graphics that are saved. oMap.UnloadTiles

MapEdit Object

Full screen map editor manipulates various aspects of a map. Not directly persistable (not owned or indexed).

Properties

NameTypeDescriptionSyntax
bPathGrid BooleanTrue if the grid is turned on for creating path points.[Let] MyBoolean = oMapEdit.bPathGrid
[Let] oMapEdit.bPathGrid = MyBoolean
bQuit BooleanWhen this becomes true the editor exits.[Let] MyBoolean = oMapEdit.bQuit
[Let] oMapEdit.bQuit = MyBoolean
bShowAllPaths BooleanSet to True to display all paths on the layer being edited.[Let] MyBoolean = oMapEdit.bShowAllPaths
[Let] oMapEdit.bShowAllPaths = MyBoolean
CurTile ByteThe index of the currently selected tile.[Let] MyByte = oMapEdit.CurTile
[Let] oMapEdit.CurTile = MyByte
Disp IBMDXDisplay3BMDXDisplay object being used by the map editor if it's active.Set MyIBMDXDisplay3 = oMapEdit.Disp
Set oMapEdit.Disp = MyIBMDXDisplay3
DisplayMessage StringIf this contains a string, it is printed on the editor screen until enter is pressed.[Let] MyString = oMapEdit.DisplayMessage
[Let] oMapEdit.DisplayMessage = MyString
EditLayer IntegerIndex of the layer being edited within theMap (the map being edited).[Let] MyInteger = oMapEdit.EditLayer
[Let] oMapEdit.EditLayer = MyInteger
EditMode IntegerThe current mode of the editor (Normal, Menu, Copy, TileMatch, Maze, etc)[Let] MyInteger = oMapEdit.EditMode
[Let] oMapEdit.EditMode = MyInteger
EditResolution Enum ResolutionMember of the"Resolution" enumeration defining the current screen resolution of the map editor.[Let] MyResolution = oMapEdit.EditResolution
[Let] oMapEdit.EditResolution = MyResolution
GeneratingMaze BooleanTrue if a maze is currently being generated.[Let] MyBoolean = oMapEdit.GeneratingMaze
[Let] oMapEdit.GeneratingMaze = MyBoolean
HorizontalResolution IntegerReturns the current horizontal resolution of the map editor screen in pixels.[Let] MyInteger = oMapEdit.HorizontalResolution
MenuMode IntegerMenu showing: 0 = Tiles + Top Menu, 1 = TileMatch, 2 = Path, 3 = Maze.[Let] MyInteger = oMapEdit.MenuMode
[Let] oMapEdit.MenuMode = MyInteger
MouseX IntegerCurrent X coordinate of the mouse.[Let] MyInteger = oMapEdit.MouseX
[Let] oMapEdit.MouseX = MyInteger
MouseY IntegerCurrent Y coordinate of the mouse.[Let] MyInteger = oMapEdit.MouseY
[Let] oMapEdit.MouseY = MyInteger
NewPath PathThe Path currently being created.Set My_Path = oMapEdit.NewPath
Set oMapEdit.NewPath = My_Path
NewSpec SpecialFunctionThe SpecialFunction currently being created.Set My_SpecialFunction = oMapEdit.NewSpec
Set oMapEdit.NewSpec = My_SpecialFunction
theMap MapReference to the Map being edited.Set My_Map = oMapEdit.theMap
Set oMapEdit.theMap = My_Map
VerticalResolution IntegerReturns the current vertical resolution of the map editor screen in pixels.[Let] MyInteger = oMapEdit.VerticalResolution
XOff LongCurrent map X-Scroll offset.[Let] MyLong = oMapEdit.XOff
[Let] oMapEdit.XOff = MyLong
XVel IntegerCurrent horizontal scroll velocity.[Let] MyInteger = oMapEdit.XVel
[Let] oMapEdit.XVel = MyInteger
YOff LongCurrent map Y-Scroll offset.[Let] MyLong = oMapEdit.YOff
[Let] oMapEdit.YOff = MyLong
YVel IntegerCurrent vertical scroll velocity.[Let] MyInteger = oMapEdit.YVel
[Let] oMapEdit.YVel = MyInteger

Methods

NameReturnDescriptionSyntax
ActivateMenu Respond to a click on the menu screen oMapEdit.ActivateMenu(X Integer, Y Integer)
CheckScroll Scroll the map according to the mouse position and scrolling inertia. oMapEdit.CheckScroll
ClipToMapView Given a GDI device context handle, this sets the clipping rectangle to the map display area. oMapEdit.ClipToMapView(hDC Long)
DrawPath Draw the specified path taking all scrolling and offsets into account. oMapEdit.DrawPath(DrawPath Path[, bToMouse Boolean = False])
DrawScreen Draw the map, special functions, paths and interactive editor text according to the current state of the editor. oMapEdit.DrawScreen
DrawSpecialFunction Draw a representation of the specified special function taking all scrolling and offsets into account. oMapEdit.DrawSpecialFunction(Spec SpecialFunction)
Edit Run the editor loop that executes until editing is complete (bQuit). oMapEdit.Edit(EditMap Map, Layer Integer)
Match2x2 Variant Return a 4x4 array of tiles that matches a 2x2 MatchDef block to a piece of the current layer. [Let] MyVariant = oMapEdit.Match2x2(LCol Integer, TRow Integer[, bErase Boolean = False])
PaintMenu Draw the menus according to the current state. oMapEdit.PaintMenu
RemoveMouseTS Clean up/release the mouse pointer graphics. oMapEdit.RemoveMouseTS

Events

NameDescriptionSyntax
OnAfterDraw Fired after the screen is drawn (good for an event that processes every loop. Sub oMapEdit_OnAfterDraw()
OnAfterMoveSprites Fired right after sprite movements are processed. Sub oMapEdit_OnAfterMoveSprites()
OnBeforeMoveSprites Fired right before sprite movements are processed. Sub oMapEdit_OnBeforeMoveSprites()
OnEditComplete Fired after all the clean-up is done after exiting the editor. Sub oMapEdit_OnEditComplete()
OnEditInit Fired after all initialization, right before entering the main editor loop. Sub oMapEdit_OnEditInit()
OnKeyPress Fired whenever a keypress occurs on the editor. Sub oMapEdit_OnKeyPress(KeyAscii Integer)
OnMouseDown Fired when mouse is pressed on the editor. Sub oMapEdit_OnMouseDown(Button Integer, Shift Integer, X Integer, Y Integer)
OnMouseMove Fired when mouse moves accross full screen editor display. Sub oMapEdit_OnMouseMove(Button Integer, Shift Integer, X Integer, Y Integer)
OnMouseUp Fired when mouse button is released in editor. Sub oMapEdit_OnMouseUp(Button Integer, Shift Integer, X Integer, Y Integer)

MapInteract Object

Code used to detect interactions between a sprite and the map. No persistent data, one instance owned by project's GamePlayer (the only sprite that can interact by default).

Properties

NameTypeDescriptionSyntax
CurX LongCurrent X position of the sprite being tested.[Let] MyLong = oMapInteract.CurX
[Let] oMapInteract.CurX = MyLong
CurY LongCurrent Y position of the sprite being tested.[Let] MyLong = oMapInteract.CurY
[Let] oMapInteract.CurY = MyLong
LastX LongPrevious X position of the sprite being tested.[Let] MyLong = oMapInteract.LastX
[Let] oMapInteract.LastX = MyLong
LastY LongPrevious Y position of the sprite being tested.[Let] MyLong = oMapInteract.LastY
[Let] oMapInteract.LastY = MyLong

Methods

NameReturnDescriptionSyntax
Move Notify this object that the sprite has moved. (Updates current and previous X,Y.) oMapInteract.Move(NewX Single, NewY Single)
TouchTest Perform the tests and raise events according to specified parameters. oMapInteract.TouchTest(SpriteObj Sprite[, InterestingTiles TileGroup = Nothing][, FirstTouchOnly TileGroup = Nothing])

Events

NameDescriptionSyntax
OnTouchSpecial Fired when the sprite touches a special function according to specified conditions. Sub oMapInteract_OnTouchSpecial(SpecialObj SpecialFunction)
OnTouchTile Fired when the sprite touches a tile according to specified conditions. Sub oMapInteract_OnTouchTile(TileX Long, TileY Long, TileVal Integer, bNewTouch Boolean)

MatchDef Object

Fully describes a "TileMatch" which automatically fits tiles together in the map editor. Indexed and owned by the project (even though sometimes appears to be indexed by tileset, and should be).

Properties

NameTypeDescriptionSyntax
AllTiles TileGroupReturn the TileGroup containing all tiles in the MatchDefSet My_TileGroup = oMatchDef.AllTiles
Name StringThe name of this MatchDef object as indexed by the project.[Let] MyString = oMatchDef.Name
[Let] oMatchDef.Name = MyString
TileMatches TileMatchReturns a TileMatch that contains the 15 groups of tiles used in the MatchDef.Set My_TileMatch = oMatchDef.TileMatches
TSDef TileSetDefIndicates the tileset to which this MatchDef applies.Set My_TileSetDef = oMatchDef.TSDef
Set oMatchDef.TSDef = My_TileSetDef

Methods

NameReturnDescriptionSyntax
Deserialize Load a MatchDef object from a string (GDP file). oMatchDef.Deserialize(Data String)
MatchMiddleGrp Byte Given all tiles around a tile, return the index of the group of tiles that fits in the middle. [Let] MyByte = oMatchDef.MatchMiddleGrp(TLTile Byte, TTile Byte, TRTile Byte, LTile Byte, RTile Byte, BLTile Byte, BTile Byte, BRTile Byte)
MatchMiddleTile Byte Given all tiles around a tile, return the index of a tile that fits in the middle. [Let] MyByte = oMatchDef.MatchMiddleTile(TLTile Byte, TTile Byte, TRTile Byte, LTile Byte, RTile Byte, BLTile Byte, BTile Byte, BRTile Byte)
Serialize String Store the contents of this MatchDef to a string. [Let] MyString = oMatchDef.Serialize
UpdateTotalGroup Recompose the group returned by AllTiles by Union-ing all groups in TileMatches into a single group. oMatchDef.UpdateTotalGroup

MatchGroups Enumeration

Members

NameValue
MG_TOPLEFT0
MG_TOP1
MG_TOPRIGHT2
MG_INNERTOPLEFT3
MG_INNERTOPRIGHT4
MG_LEFT5
MG_CENTER6
MG_RIGHT7
MG_INNERBOTTOMLEFT8
MG_INNERBOTTOMRIGHT9
MG_BOTTOMLEFT10
MG_BOTTOM11
MG_BOTTOMRIGHT12
MG_INNERDIAGONALRIGHT13
MG_INNERDIAGONALLEFT14

MediaClip Object

References a multimedia file that can be played (usually in response to an event). Owned and indexed by MediaManager (= project).

Properties

NameTypeDescriptionSyntax
bCancelModalMedia BooleanSet to True to stop a modal clip from playing (in response to an event).[Let] MyBoolean = oMediaClip.bCancelModalMedia
[Let] oMediaClip.bCancelModalMedia = MyBoolean
Flags IntegerDetermines various aspects of how the clip behaves.[Let] MyInteger = oMediaClip.Flags
[Let] oMediaClip.Flags = MyInteger
Name StringThe name of this clip as indexed by the MediaManager object.[Let] MyString = oMediaClip.Name
[Let] oMediaClip.Name = MyString
OutputX IntegerFor video clips, set the left side of the output.[Let] MyInteger = oMediaClip.OutputX
[Let] oMediaClip.OutputX = MyInteger
OutputY IntegerFor video clips, set the top of the output.[Let] MyInteger = oMediaClip.OutputY
[Let] oMediaClip.OutputY = MyInteger
strMediaFile StringThe path to the clip file as stored in the project file.[Let] MyString = oMediaClip.strMediaFile
[Let] oMediaClip.strMediaFile = MyString
Volume IntegerHow loud this clip should be played (0=max, -10000=min).[Let] MyInteger = oMediaClip.Volume
[Let] oMediaClip.Volume = MyInteger

Methods

NameReturnDescriptionSyntax
Deserialize Load a media clip definition from the project file (string). oMediaClip.Deserialize(Data String)
FadeOut Start this clip on a process of fading out to silence. oMediaClip.FadeOut
IsPlaying Boolean Returns True if the clip is currently playing. [Let] MyBoolean = oMediaClip.IsPlaying
Play Start or continue playing this clip, optionally fading it to a new media file. Use StartClip to check allow MEDIA_ALLOW_INTERRUPT use. oMediaClip.Play([strNewMedia String = ])
Reset Reset this clip to the state it was in when the project was loaded. oMediaClip.Reset
Serialize String Store the definition of this clip to a string for the project file. [Let] MyString = oMediaClip.Serialize
StartClip Taking into account the MEDIA_ALLOW_INTERRUPT flag, will either continue or restart the playing of the clip (using Play method). oMediaClip.StartClip
StopClip Abruptly stop playing the clip. oMediaClip.StopClip(bForceRewind Boolean)

MediaManager Object

Manages multimedia clips for the project. Owned by and saved with the project.

Properties

NameTypeDescriptionSyntax
Clip MediaClipReturn a MediaClip object given its name or ordinal index in the MediaManager.Set My_MediaClip = oMediaManager.Clip(Key Variant)
MediaClipCount IntegerReturn the number of MediaClips in the MediaManager.[Let] MyInteger = oMediaManager.MediaClipCount

Methods

NameReturnDescriptionSyntax
AddClip Add a clip object to the manager to be managed / saved with the project. oMediaManager.AddClip(Clip MediaClip)
CancelModalMedia Stop playing modal clips now (in response to an event). oMediaManager.CancelModalMedia
ClipExists Boolean Return True if a MediaClip by the specified name or index exists in the MediaManager. [Let] MyBoolean = oMediaManager.ClipExists(Key Variant)
Deserialize Load all the clips for the project into the MediaManager from a string. oMediaManager.Deserialize(Data String)
ModalFadeOutAll Fade out and stop all media clips, then return to the caller. oMediaManager.ModalFadeOutAll
NewClip MediaClip Create and return a new MediaClip with the specified parameters, optionally adding it to the manager. Set My_MediaClip = oMediaManager.NewClip(bAddToCollection Boolean, ClipName Variant, MediaFile Variant, Flags Variant, OutputX Variant, OutputY Variant, Volume Integer)
RemoveClip Remove a MediaClip from the MediaManager by name or index. oMediaManager.RemoveClip(Key Variant)
RenderActiveMedia Continue processing all MediaClips according to their various processes and parameters. oMediaManager.RenderActiveMedia
Serialize String Store all MediaClip definitions into a string for the project file. [Let] MyString = oMediaManager.Serialize
UnloadAll Reset all MediaClips to their initial state. oMediaManager.UnloadAll

MEDIA_FLAGS Enumeration

Members

NameValue
MEDIA_KEEP_LOADED1
MEDIA_VIDEO2
MEDIA_LOOP8
MEDIA_MODAL16
MEDIA_SUSPEND_OTHERS32
MEDIA_WAITING_ON_SUSPEND64
MEDIA_SUSPEND128
MEDIA_AUDIO256
MEDIA_ALLOW_INTERRUPT512

Path Object

A series of points on a layer that a sprite can follow. Indexed and owned by map.

Properties

NameTypeDescriptionSyntax
LayerName StringReturn the name of the layer to which this path applies.[Let] MyString = oPath.LayerName
[Let] oPath.LayerName = MyString
Name StringThe name of this path as indexed by the Map.[Let] MyString = oPath.Name
[Let] oPath.Name = MyString
PointCount IntegerReturn the number of points in the Path.[Let] MyInteger = oPath.PointCount
PointX LongReturn the X coordnate of the point specified by index. Negative X value means this is a delay point for -X frames.[Let] MyLong = oPath.PointX(Index Long)
PointY LongReturn the Y coordnate of the point specified by index.[Let] MyLong = oPath.PointY(Index Long)

Methods

NameReturnDescriptionSyntax
AddPoint Add an endpoint to this Path oPath.AddPoint(X Long, Y Long)
GetUsedBy SpriteDef Find and return the first SpriteDef that uses this path. Set My_SpriteDef = oPath.GetUsedBy
InsertPoint Insert a point at the specified index, shifting the rest up in index. oPath.InsertPoint(X Long, Y Long, Index Long)
OffsetBy Move all points in the path by the specified offset. oPath.OffsetBy(X Long, Y Long)
RemovePoint Remove a point from this path, specified by index, shifting the rest back. oPath.RemovePoint(Index Integer)

Player Object

The object used to handle playing the game, and the player sprite's control of the game. Owned by project.

Properties

NameTypeDescriptionSyntax
bEnableJoystick BooleanAllow joystick control of the player (True or False).[Let] MyBoolean = oPlayer.bEnableJoystick
[Let] oPlayer.bEnableJoystick = MyBoolean
bIgnoreValidate BooleanA script can turn off automatic validation by setting this if it knows the project appears inavlid when it's valid.[Let] MyBoolean = oPlayer.bIgnoreValidate
[Let] oPlayer.bIgnoreValidate = MyBoolean
bQuit BooleanSet to True to end main Play loop.[Let] MyBoolean = oPlayer.bQuit
[Let] oPlayer.bQuit = MyBoolean
BtnStates IntegerThe current state of the controller in terms of special function flags. CtlActions translated by TranslateCtlActions method.[Let] MyInteger = oPlayer.BtnStates
[Let] oPlayer.BtnStates = MyInteger
BtnStatesOld IntegerState of the controller from the previous frame (in terms of special function flags)[Let] MyInteger = oPlayer.BtnStatesOld
[Let] oPlayer.BtnStatesOld = MyInteger
CounterFrequency CurrencyContains the frequency (Hz) of the frame-limiting counter if frame rate limiting is enabled or if FPS is displayed.[Let] MyCurrency = oPlayer.CounterFrequency
[Let] oPlayer.CounterFrequency = MyCurrency
CtlActions IntegerA bitmask of eActionBits flags indicating the current state of the input controllers ORed together.[Let] MyInteger = oPlayer.CtlActions
[Let] oPlayer.CtlActions = MyInteger
DefaultScript StringIf no other script is specified, run this script at startup when in play mode.[Let] MyString = oPlayer.DefaultScript
[Let] oPlayer.DefaultScript = MyString
Disp IBMDXDisplay3BMDXDisplay object representing the full screen display if currently playing.Set MyIBMDXDisplay3 = oPlayer.Disp
Set oPlayer.Disp = MyIBMDXDisplay3
FirstTouchTiles TileGroupA TileGroup to mask in all tiles which are only interested when initially touched. (optimization for MapInteract.TouchTest.)Set My_TileGroup = oPlayer.FirstTouchTiles
Set oPlayer.FirstTouchTiles = My_TileGroup
FrameCounter IntegerNumber of frames drawn this second if FPS is being displayed.[Let] MyInteger = oPlayer.FrameCounter
[Let] oPlayer.FrameCounter = MyInteger
FrameRateLimit IntegerMaximum number of frames per second to allow. Zero disables limiting.[Let] MyInteger = oPlayer.FrameRateLimit
[Let] oPlayer.FrameRateLimit = MyInteger
HorizontalResolution IntegerReturns the horizontal resolution of the full screen display based on PlaybackResolution setting (read-only).[Let] MyInteger = oPlayer.HorizontalResolution
InterestingTiles TileGroupTiles which should be considered for raising an event when touched. (Optimization for MapInteract.TouchTest)Set My_TileGroup = oPlayer.InterestingTiles
Set oPlayer.InterestingTiles = My_TileGroup
InvBarBackgroundColor LongReturn the background color for a bar on an inventory item display.[Let] MyLong = oPlayer.InvBarBackgroundColor(Index Integer)
InvBarColor LongReturn the color for a bar on an inventory item display.[Let] MyLong = oPlayer.InvBarColor(Index Integer)
InvBarLength IntegerReturn the total length of an inventory item's display bar in pixels.[Let] MyInteger = oPlayer.InvBarLength(Index Integer)
InvBarMargin IntegerSet the margin between all inventory item displays and their respective quantity display.[Let] MyInteger = oPlayer.InvBarMargin
[Let] oPlayer.InvBarMargin = MyInteger
InvBarOutlineColor LongReturn the outline color for a bar on an inventory item display.[Let] MyLong = oPlayer.InvBarOutlineColor(Index Integer)
InvBarThickness IntegerReturn the thickness of a bar in the inventory item display.[Let] MyInteger = oPlayer.InvBarThickness(Index Integer)
InvDisplayX IntegerReturn the X coordinate for the display of a particular inventory item.[Let] MyInteger = oPlayer.InvDisplayX(Index Integer)
InvDisplayY IntegerReturn the Y coordinate for the display of a particular inventory item.[Let] MyInteger = oPlayer.InvDisplayY(Index Integer)
InventoryCount IntegerReturn the number of defined inventory items.[Let] MyInteger = oPlayer.InventoryCount
InventoryItemName StringGet or set the display name of an item in the inventory.[Let] oPlayer.InventoryItemName(Index Integer) = MyString
[Let] MyString = oPlayer.InventoryItemName(Index Integer)
InvIconCountPerRepeat IntegerHow many images of this inventory item are there to represent owning 1, 2, 3 (etc) of this item.[Let] oPlayer.InvIconCountPerRepeat(Index Integer) = MyInteger
[Let] MyInteger = oPlayer.InvIconCountPerRepeat(Index Integer)
InvIconTileIdx IntegerReturn the index of the tile used to represent an inventory item.[Let] MyInteger = oPlayer.InvIconTileIdx(Index Integer)
InvIconTilesetIdx IntegerReturn the ordinal index in the project of the TileSetDef containing the graphics for this inventory item.[Let] MyInteger = oPlayer.InvIconTilesetIdx(Index Integer)
InvMaxQuantity IntegerGet or set the maximum number of an item that the player can own.[Let] oPlayer.InvMaxQuantity(Index Integer) = MyInteger
[Let] MyInteger = oPlayer.InvMaxQuantity(Index Integer)
InvQuantityDisplayType Enum QuantityDisplayGet or set how an inventory item should be displayed.[Let] MyQuantityDisplay = oPlayer.InvQuantityDisplayType(Index Integer)
[Let] oPlayer.InvQuantityDisplayType(Index Integer) = MyQuantityDisplay
InvQuantityOwned IntegerGet or set how many of an inventory item the player currently owns.[Let] oPlayer.InvQuantityOwned(Index Integer) = MyInteger
[Let] MyInteger = oPlayer.InvQuantityOwned(Index Integer)
JoyActions IntegerA bitmask of eActionBits flags indicating the current state of the joystick.[Let] MyInteger = oPlayer.JoyActions
[Let] oPlayer.JoyActions = MyInteger
JoyButton1 BooleanReturn True if button 1 on the joystick was pressed when PollJoystick was last called.[Let] MyBoolean = oPlayer.JoyButton1
JoyButton2 BooleanReturn True if button 2 on the joystick was pressed when PollJoystick was last called.[Let] MyBoolean = oPlayer.JoyButton2
JoyButton3 BooleanReturn True if button 3 on the joystick was pressed when PollJoystick was last called.[Let] MyBoolean = oPlayer.JoyButton3
JoyButton4 BooleanReturn True if button 4 on the joystick was pressed when PollJoystick was last called.[Let] MyBoolean = oPlayer.JoyButton4
JoyX LongReturn the X coordinate of the joystick (0-65535) when PollJoystick was last called.[Let] MyLong = oPlayer.JoyX
JoyY LongReturn the Y coordinate of the joystick (0-65535) when PollJoystick was last called.[Let] MyLong = oPlayer.JoyY
JSValid BooleanReturn True if joystick input was valid after the last PollJoystick call.[Let] MyBoolean = oPlayer.JSValid
[Let] oPlayer.JSValid = MyBoolean
KeyActions IntegerA bitmask of eActionBits flags indicating the current state of the keyboard.[Let] MyInteger = oPlayer.KeyActions
[Let] oPlayer.KeyActions = MyInteger
KeyConfig IntegerGet or set the virtual key used for an action: Up, Left, Right, Down, Buttons 1-4.[Let] MyInteger = oPlayer.KeyConfig(Idx Integer)
[Let] oPlayer.KeyConfig(Idx Integer) = MyInteger
LastFPS StringContains the last calculated FPS value if FPS display is enabled.[Let] MyString = oPlayer.LastFPS
[Let] oPlayer.LastFPS = MyString
LastFrameTime CurrencyContains the timer value at which the last frame finished if frame rate limiting is enabled or if FPS is displayed (see also CounterFrequency).[Let] MyCurrency = oPlayer.LastFrameTime
[Let] oPlayer.LastFrameTime = MyCurrency
MapScrollX LongGet or set the current horizontal scroll position of the map.[Let] MyLong = oPlayer.MapScrollX
[Let] oPlayer.MapScrollX = MyLong
MapScrollY LongGet or set the current vertical scroll position of the map.[Let] MyLong = oPlayer.MapScrollY
[Let] oPlayer.MapScrollY = MyLong
PeriodStart CurrencyContains the timer value when frame counting for the current timing period began, if FPS is being displayed.[Let] MyCurrency = oPlayer.PeriodStart
[Let] oPlayer.PeriodStart = MyCurrency
PlaybackResolution Enum ResolutionSpecifies the resolution of the full screen display.[Let] MyResolution = oPlayer.PlaybackResolution
[Let] oPlayer.PlaybackResolution = MyResolution
PlayerSprite SpriteAfter InitPlayerSprite is called, this refers to the player sprite object.Set My_Sprite = oPlayer.PlayerSprite
Set oPlayer.PlayerSprite = My_Sprite
rMap MapReference to the map object currently being displayed by the game player.Set My_Map = oPlayer.rMap
Set oPlayer.rMap = My_Map
ScrollMarginX IntegerGet or set how close the edge of the player sprite can get to the edge of the map window before scrolling.[Let] MyInteger = oPlayer.ScrollMarginX
[Let] oPlayer.ScrollMarginX = MyInteger
ScrollMarginY IntegerGet or set how close the edge of the player sprite can get to the edge of the map window before scrolling.[Let] MyInteger = oPlayer.ScrollMarginY
[Let] oPlayer.ScrollMarginY = MyInteger
StartMapName StringSet the name of the map where play initially starts.[Let] MyString = oPlayer.StartMapName
[Let] oPlayer.StartMapName = MyString
Touch MapInteractObject instance that tests for interactions between the player sprite and the map.Set My_MapInteract = oPlayer.Touch
Set oPlayer.Touch = My_MapInteract
TriggerX LongX coordinate in pixels of the last sprite collision (sprite A) or tile interaction (tile location)[Let] MyLong = oPlayer.TriggerX
[Let] oPlayer.TriggerX = MyLong
TriggerY LongY coordinate in pixels of the last sprite collision (sprite A) or tile interaction (tile location)[Let] MyLong = oPlayer.TriggerY
[Let] oPlayer.TriggerY = MyLong
VerticalResolution IntegerReturns the vertical resolution of the full screen display based on PlaybackResolution setting (read-only).[Let] MyInteger = oPlayer.VerticalResolution

Methods

NameReturnDescriptionSyntax
ActivateFunction Perform the actions dictated by a SpecialFunction. oPlayer.ActivateFunction(SpecialObj SpecialFunction)
AddInventoryItem Integer Add a new inventory item definition. [Let] MyInteger = oPlayer.AddInventoryItem(QuantityDisplayType Enum QuantityDisplay, DisplayX Integer, DisplayY Integer)
AutoScrollMap Scroll the map according to the player's position. oPlayer.AutoScrollMap
Deserialize Load the player-related information from a project file string. oPlayer.Deserialize(Data String)
DeserializeRuntime Processes data from the .sav saved game file to reconstruct the running state of the Player within the game. oPlayer.DeserializeRuntime(Data String)
DrawFPS Draw the frame rate at the top right of the display if FPS display is enabled. oPlayer.DrawFPS
DrawInventory Draw all components of the inventory onto the screen in appropriate places. oPlayer.DrawInventory
DrawInvItem Draw a single inventory item onto the display. hDC=NULL: draw only tiles. hDC <> NULL: draw only lines/text. oPlayer.DrawInvItem(Index Integer[, hDC Long = 0])
DrawMap Draw the map according to its current scrolled position in the game player. oPlayer.DrawMap
InitPlayerSprite Boolean Initialize FirstTouchTiles, InterestingTiles and PlayerSprite properties. [Let] MyBoolean = oPlayer.InitPlayerSprite
InvMove Change the X and Y coordinates of an inventory item's display. oPlayer.InvMove(Index Integer, DisplayX Integer, DisplayY Integer)
InvSetBarInfo Set all aspects of how a bar is displayed for an inventory item. oPlayer.InvSetBarInfo(Index Integer, BarColor Long, BarThickness Integer, BarLength Integer[, BackgroundColor Long = -1][, OutlineColor Long = -1])
JoyMove Process the current state of the joystick and raises OnControllerMove events if appropriate. oPlayer.JoyMove
Play The main play loop initializes and plays the game after it's loaded. oPlayer.Play(ScreenDepth Integer)
PlayFunctionMedia Play a media clip associated with a function. oPlayer.PlayFunctionMedia(SpecialObj SpecialFunction)
PollJoystick Read the current state of the joystick. oPlayer.PollJoystick(StickNum Integer)
PopLocation Returns to a previous location stored with PushLocation. oPlayer.PopLocation(bRememberSprites Boolean[, strAsSprite String = ])
PrepareMapInventory Processes the inventory items to be displayed for the current map; makes sure they will display as indicated by rMap.DisplayInventory. oPlayer.PrepareMapInventory
PushLocation Stores the player's current map location and sprite type onto a stack so you can return to it with PopLocation. oPlayer.PushLocation
ReIndexTilesetRefs Find the indexes of the tilesets named in the inventory to prepare for efficient inventory drawing. oPlayer.ReIndexTilesetRefs
RemoveInventoryItem Remove an inventory item definition. oPlayer.RemoveInventoryItem(Index Integer)
Serialize String Store the persistable contents of the game player object to a string for the project file. [Let] MyString = oPlayer.Serialize
SerializeRuntime String Stores the running state of the player object into a string for writing to the .sav saved game file. [Let] MyString = oPlayer.SerializeRuntime
SetInventoryTile Set the tileset (by name or index) and tile index used to display a particular inventory item. oPlayer.SetInventoryTile(Index Integer, TileSetKey Variant, TileIndex Integer)
TranslateCtlActions Integer Translates a value from eActionBits flag format to InteractionFlags/InteractionFlags2 flag format. [Let] MyInteger = oPlayer.TranslateCtlActions(nActions Integer)
TriggerCollide Fires OnSpritesCollide oPlayer.TriggerCollide(Name String, ClsASprIdx Integer, ClsBSprIdx Integer, CollDefIdx Integer)
TriggerNewSprite Fires OnNewSprite. oPlayer.TriggerNewSprite(NewSprite Sprite)
WaitForFrame Waits until the next frame should be drawn if FPS limiting is enabled. oPlayer.WaitForFrame

Events

NameDescriptionSyntax
OnAfterMoveSprites Fired right after all the sprite movements are processed. (Only when game has focus) Sub oPlayer_OnAfterMoveSprites()
OnBeforeMoveSprites Fired right before all the sprite movements are processed. (Only when game has focus) Sub oPlayer_OnBeforeMoveSprites()
OnControllerMove Fired when an input controller moves (CtlActions changes). Sub oPlayer_OnControllerMove(OldActions Integer, NewActions Integer)
OnFrameStart Fired at the beginning of each frame. Parameter indicates whether game has focus or if it has been minimized/paused. Sub oPlayer_OnFrameStart(bGameIsActive Boolean)
OnNewSprite Fired when a new sprite is added to a layer. Sub oPlayer_OnNewSprite(NewSprite Sprite)
OnPlayComplete Fired after all the clean up is done after exiting the game player Play loop. Sub oPlayer_OnPlayComplete()
OnPlayInit Fired after initialization is complete, right before Play loop starts. Sub oPlayer_OnPlayInit()
OnSpecialFunction Fired when the player touches a special function that raises an event. Sub oPlayer_OnSpecialFunction(SpecialObj SpecialFunction)
OnSpritesCollide Fired when sprites collide. Sub oPlayer_OnSpritesCollide(Name String, ClsASprIdx Integer, ClsBSprIdx Integer, CollDefIdx Integer)
OnTileInteraction Fired when a map tile interaction raises an event. Sub oPlayer_OnTileInteraction(TileX Long, TileY Long, TileValue Integer, bNewTouch Boolean, InteractionIndex Integer)

QuantityDisplay Enumeration

Members

NameValue
QD_NONE0
QD_HORZBARABOVE1
QD_HORZBARBELOW2
QD_HORZBARRIGHT3
QD_VERTBARABOVE4
QD_VERTBARRIGHT5
QD_VERTBARLEFT6
QD_TEXTABOVE7
QD_TEXTBELOW8
QD_TEXTLEFT9
QD_TEXTRIGHT10
QD_REPEATICONRIGHT11
QD_REPEATICONABOVE12
QD_REPEATICONBELOW13
QD_INCREASEICONINDEX14
QD_ICONINDEXREPEATRIGHT15
QD_ICONINDEXREPEATABOVE16
QD_ICONINDEXREPEATBELOW17

Resolution Enumeration

Members

NameValue
RES_320x2401
RES_640x4802
RES_800x6003
RES_1024x7684

ScriptHost Object

Script hosting object. One global instance exists. Adds an Engine object to the script's global namespace.

Properties

NameTypeDescriptionSyntax
bScriptIsRunning BooleanIndicates if script is running.[Let] MyBoolean = oScriptHost.bScriptIsRunning
[Let] oScriptHost.bScriptIsRunning = MyBoolean
GameDevTypeLibFile StringGet the file containing the type library for the current EXE (Path to GameDev.EXE or GDPlay.EXE).[Let] MyString = oScriptHost.GameDevTypeLibFile
ScriptTimeOutSeconds SingleHow many seconds may elapse before GameDev attempts to abort the script with a timeout error. Set to 0 to disable.[Let] MySingle = oScriptHost.ScriptTimeOutSeconds
[Let] oScriptHost.ScriptTimeOutSeconds = MySingle
StartScript IntegerIf set (>=0), clear out the current script and start a new one (mainly to sink new events). [Let] MyInteger = oScriptHost.StartScript
[Let] oScriptHost.StartScript = MyInteger
TempStorage VariantVariant can contain any object/array/value while switching scripts, for instance, after setting StartScript.[Let] MyVariant = oScriptHost.TempStorage
[Let] oScriptHost.TempStorage = MyVariant
Set oScriptHost.TempStorage = MyVariant

Methods

NameReturnDescriptionSyntax
AddObjectWithEvents Create a new instance of an object and add it to the script's namespace and sink events for it. oScriptHost.AddObjectWithEvents(Class String, Name String, TypeLibraryFile String)
AsObject Object Extracts the object from the passed variable and returns it as an object instead of a variant. Required in calls to AddSprite etc. [Let] MyObject = oScriptHost.AsObject(VarObj Variant)
CapturePic Picture Capture a portion of the specified display handle (hDC) into a Picture object. Set MyPicture = oScriptHost.CapturePic(hDC Long, Left Long, Top Long, Width Long, Height Long)
CheckForError Boolean Display a MessageBox if there has been a script error, and clear the error. [Let] MyBoolean = oScriptHost.CheckForError
ConnectEventsNow Finalize all the object event sinks and connect them to the script. oScriptHost.ConnectEventsNow
DoCommand Variant For future expansion. [Let] MyVariant = oScriptHost.DoCommand(CmdInfo Variant)
ExtractPic Picture Given a picture object, extract a piece of the picture as a new picture, optionally highlighting it in blue. Set MyPicture = oScriptHost.ExtractPic(Pic Variant, ExLeft Long, ExTop Long, ExWidth Long, ExHeight Long[, bHighlight Boolean = False])
InitScript Load a script file into memory. Split it into its parts if it has "#Split" in it. oScriptHost.InitScript(StartupScript String)
PasteTileToPic Paste a picture object into another picture object at the specified coordinates. oScriptHost.PasteTileToPic(Pic Variant, Tile Variant, X Integer, Y Integer)
RunStartScript Initialize and run the script indicated by StartScript. oScriptHost.RunStartScript
SinkObjectEvents Sink an object's events with the given name. (Must be before ConnectEventsNow to work.) oScriptHost.SinkObjectEvents(ObjInstance Object, Name String, ProgId String, TypeLibraryFile String)
TypeLibFromLibID String Given a LibID in the format {00000200-0000-0010-8000-00AA006D2EA4} return the file. [Let] MyString = oScriptHost.TypeLibFromLibID(LibID String, VerMajor Integer, VerMinor Integer)

SolidDef Object

Named set of Category objects classified into different shapes defining the shape of solid tiles. Indexed by tileset, owned by project.

Properties

NameTypeDescriptionSyntax
DownCeil CategoryCategory object containing tiles sloped down and right, solid above.Set My_Category = oSolidDef.DownCeil
Set oSolidDef.DownCeil = My_Category
Downhill CategoryCategory object containing tiles sloped down and right, solid below.Set My_Category = oSolidDef.Downhill
Set oSolidDef.Downhill = My_Category
Name StringThe name of the SolidDef as indexed by the project.[Let] MyString = oSolidDef.Name
[Let] oSolidDef.Name = MyString
Solid CategoryCategory object containing completely solid tiles.Set My_Category = oSolidDef.Solid
Set oSolidDef.Solid = My_Category
TSName StringName of the tileset to which this SoidDef applies.[Let] MyString = oSolidDef.TSName
[Let] oSolidDef.TSName = MyString
UpCeil CategoryCategory object containing tiles sloped up and right, solid above.Set My_Category = oSolidDef.UpCeil
Set oSolidDef.UpCeil = My_Category
Uphill CategoryCategory object containing tiles sloped up and right, solid below.Set My_Category = oSolidDef.Uphill
Set oSolidDef.Uphill = My_Category

Methods

NameReturnDescriptionSyntax
Deserialize Load a SolidDef from a project file string. oSolidDef.Deserialize(Data String)
GetIndex Integer Find the index of the SolidDef as indexed by the project. [Let] MyInteger = oSolidDef.GetIndex
GetIndexByTileset Integer Find the index of the SolidDef as indexed by Project.SolidDefIndexByTileset. [Let] MyInteger = oSolidDef.GetIndexByTileset(TSName String)
Remove Remove the SolidDef object from the project. oSolidDef.Remove
Serialize String Return the contents of the SolidDef object as a string for the project file. [Let] MyString = oSolidDef.Serialize

SpecialFuncs Enumeration

Members

NameValue
SPECIAL_MESSAGE1
SPECIAL_SWITCHSPRITE2
SPECIAL_SWITCHMAP3
SPECIAL_TELEPORT4
SPECIAL_ALTERMAP5
SPECIAL_CREATESPRITE6
SPECIAL_EVENT7
SPECIAL_DELETESPRITE8
SPECIAL_ALTERINVENTORY9
SPECIAL_SERIES10
SPECIAL_SAVELOADGAME11

SpecialFunction Object

Defines the conditions and reaction for a special interaction between the player and a rectangle on the map. Owned and indexed by map.

Properties

NameTypeDescriptionSyntax
AlterCount IntegerReturns the "Change by" value for Alter Inventory function (stored in DestX)[Let] MyInteger = oSpecialFunction.AlterCount
[Let] oSpecialFunction.AlterCount = MyInteger
DestX LongTarget coordinate of the special function. Units depends on function.[Let] MyLong = oSpecialFunction.DestX
[Let] oSpecialFunction.DestX = MyLong
DestY LongTarget coordinate of the special function. Units depends on function.[Let] MyLong = oSpecialFunction.DestY
[Let] oSpecialFunction.DestY = MyLong
Flags IntegerBitmask of InteractionFlags dictating various aspects how the function behaves.[Let] MyInteger = oSpecialFunction.Flags
[Let] oSpecialFunction.Flags = MyInteger
Flags2 LongA bitmask of InteractionFlags2 values indicating aspects of how the function behaves (an extension to the flags property).[Let] MyLong = oSpecialFunction.Flags2
[Let] oSpecialFunction.Flags2 = MyLong
FuncType Enum SpecialFuncsType of action this special function takes.[Let] MySpecialFuncs = oSpecialFunction.FuncType
[Let] oSpecialFunction.FuncType = MySpecialFuncs
InvItem ByteIndex of the inventory item used by this function.[Let] MyByte = oSpecialFunction.InvItem
[Let] oSpecialFunction.InvItem = MyByte
InvUseCount IntegerHow many of InvItem are used to activate the function.[Let] MyInteger = oSpecialFunction.InvUseCount
[Let] oSpecialFunction.InvUseCount = MyInteger
LayerIndex IntegerIndex of the layer in this map to which the SpecialFunction applies.[Let] MyInteger = oSpecialFunction.LayerIndex
[Let] oSpecialFunction.LayerIndex = MyInteger
LimitFuncName StringReturns name of function to run if Alter Inventory hits a limit (value is stored in SpriteName property).[Let] MyString = oSpecialFunction.LimitFuncName
[Let] oSpecialFunction.LimitFuncName = MyString
MediaName StringName of the MediaClip (if any) that plays when the function is activated.[Let] MyString = oSpecialFunction.MediaName
[Let] oSpecialFunction.MediaName = MyString
Name StringName of the SpecialFunction as indexed by the Map.[Let] MyString = oSpecialFunction.Name
[Let] oSpecialFunction.Name = MyString
SaveGameFuncName StringName of the function to activate when a save-game type function needs to activate another function. Shares the same memory as the SpriteName property.[Let] MyString = oSpecialFunction.SaveGameFuncName
[Let] oSpecialFunction.SaveGameFuncName = MyString
SpriteName StringName of the sprite relavent to this SpecialFunction (if any).[Let] MyString = oSpecialFunction.SpriteName
[Let] oSpecialFunction.SpriteName = MyString
TileBottom IntegerThe bottom coordinate of the special function's activation rectangle.[Let] MyInteger = oSpecialFunction.TileBottom
[Let] oSpecialFunction.TileBottom = MyInteger
TileLeft IntegerThe left coordinate of the special function's activation rectangle.[Let] MyInteger = oSpecialFunction.TileLeft
[Let] oSpecialFunction.TileLeft = MyInteger
TileRight IntegerThe right coordinate of the special function's activation rectangle.[Let] MyInteger = oSpecialFunction.TileRight
[Let] oSpecialFunction.TileRight = MyInteger
TileTop IntegerThe top coordinate of the special function's activation rectangle.[Let] MyInteger = oSpecialFunction.TileTop
[Let] oSpecialFunction.TileTop = MyInteger
Value StringThe name of a target of the SpecialFunction. Meaning depends on FuncType.[Let] MyString = oSpecialFunction.Value
[Let] oSpecialFunction.Value = MyString

Methods

NameReturnDescriptionSyntax
Load Load a SpecialFunction from the binary map file. oSpecialFunction.Load(nFileNum Integer)
Save Write the SpecialFunction to a binary file. oSpecialFunction.Save(nFileNum Integer)

Sprite Object

Represents a single currently active sprite instance on a layer. Indexed and owned by layer. Not persistent.

Properties

NameTypeDescriptionSyntax
bHitSolid BooleanSet to true during ReactToSolid if sprite hits a solid tile.[Let] MyBoolean = oSprite.bHitSolid
[Let] oSprite.bHitSolid = MyBoolean
byAccelDir ByteReturns current acceleration flags 1=horizontal, 2=vertical, 3=both (36-state is always 3 or 0)[Let] MyByte = oSprite.byAccelDir
[Let] oSprite.byAccelDir = MyByte
CurDelay ByteHow many frames into the delay for the current image is the animation state of the sprite.[Let] MyByte = oSprite.CurDelay
[Let] oSprite.CurDelay = MyByte
CurFrame ByteGet/set which image (from teh current state's animation) is currently being displayed.[Let] MyByte = oSprite.CurFrame
[Let] oSprite.CurFrame = MyByte
CurState ByteGet/set which state the sprite is currently in.[Let] MyByte = oSprite.CurState
[Let] oSprite.CurState = MyByte
CurTile IntegerReturns the tile index within the sprite's tileset that is used to draw the sprite in its current state.[Let] MyInteger = oSprite.CurTile
CurTS IBMDXTileSetReturns the tileset used to draw the sprite in its crrent state.Set MyIBMDXTileSet = oSprite.CurTS
CurTSDef TileSetDefReturns the TileSetDef used to draw the sprite in its current state.Set My_TileSetDef = oSprite.CurTSDef
DX SingleDelta-X (x velocity) of this sprite.[Let] MySingle = oSprite.DX
[Let] oSprite.DX = MySingle
DY SingleDelta-Y (y velocity) of this sprite.[Let] MySingle = oSprite.DY
[Let] oSprite.DY = MySingle
Height IntegerReturn the height of the sprite in its current state.[Let] MyInteger = oSprite.Height
NextPointIndex IntegerGet/set the index of the point (on SpriteDef's Path) toward which the sprite is moving.[Let] MyInteger = oSprite.NextPointIndex
[Let] oSprite.NextPointIndex = MyInteger
PathOffsetX SingleFor a sprite following a relative path, indicates the horizontal offset from the path starting point to the sprite's starting point.[Let] MySingle = oSprite.PathOffsetX
[Let] oSprite.PathOffsetX = MySingle
PathOffsetY SingleFor a sprite following a relative path, indicates the vertical offset from the path starting point to the sprite's starting point.[Let] MySingle = oSprite.PathOffsetY
[Let] oSprite.PathOffsetY = MySingle
pRideOnRef SpriteReference to the sprite that this sprite is riding on (platform).Set My_Sprite = oSprite.pRideOnRef
Set oSprite.pRideOnRef = My_Sprite
rDef SpriteDefReference to this sprite's SpriteDef.Set My_SpriteDef = oSprite.rDef
Set oSprite.rDef = My_SpriteDef
RideRelX SingleX position relative to a platform the sprite is riding on.[Let] MySingle = oSprite.RideRelX
[Let] oSprite.RideRelX = MySingle
UserData VariantNot touched by GameDev, to be used in script or external controlling programs.[Let] MyVariant = oSprite.UserData
[Let] oSprite.UserData = MyVariant
Set oSprite.UserData = MyVariant
WaitCounter LongWhen stopped at a pause point in a path (negative X=delay), this counts down to that value before proceeding.[Let] MyLong = oSprite.WaitCounter
[Let] oSprite.WaitCounter = MyLong
Width IntegerThe width of the sprite in its current state.[Let] MyInteger = oSprite.Width
X SingleCurrent X position of the sprite within the layer.[Let] MySingle = oSprite.X
[Let] oSprite.X = MySingle
Y SingleCurrent Y position of the sprite within the layer.[Let] MySingle = oSprite.Y
[Let] oSprite.Y = MySingle

Methods

NameReturnDescriptionSyntax
Advance Move this sprite to its next position based on it's SpriteDef and SpriteTemplate. oSprite.Advance
AdvanceFrame Advance the image for this sprite by a specified number of frames. oSprite.AdvanceFrame(Distance Integer)
NextRandomPoint Integer Returns the index of the next point a sprite can head toward when following a path randomly. [Let] MyInteger = oSprite.NextRandomPoint
ProcessAction Boolean Set DX, DY and CurState based on passed Action flags (ie. Player.CtlActions), return True if accellerating. [Let] MyBoolean = oSprite.ProcessAction(Actions Integer)
ReactToSolid Alter DX and DY according to map solidity via SolidDef in Sprite's template. oSprite.ReactToSolid
ResetFrame Restart sprite's animation (without changing state). oSprite.ResetFrame
RideOn Variant Check if sprite is going the correct direction to land on the platform, if so, ride on it. [Let] MyVariant = oSprite.RideOn(Platform Sprite)

SpriteDef Object

Defines a sprite based on a path and a template. Indexed and owned by map. (Path determines layer.)

Properties

NameTypeDescriptionSyntax
Flags ByteeDefFlagBits value (indicates whether to create instance on map start)[Let] MyByte = oSpriteDef.Flags
[Let] oSpriteDef.Flags = MyByte
Name StringName of this SpriteDef as indexed by the Map.[Let] MyString = oSpriteDef.Name
[Let] oSpriteDef.Name = MyString
rLayer LayerReference to the layer where sprites of this SpriteDef exist (comes from rPath).Set My_Layer = oSpriteDef.rLayer
Set oSpriteDef.rLayer = My_Layer
rPath PathReference to the path that sprites of this SpriteDef follow.Set My_Path = oSpriteDef.rPath
Set oSpriteDef.rPath = My_Path
StateCount IntegerReturn the number of sprite states in this SpriteDef's template.[Let] MyInteger = oSpriteDef.StateCount
StateFrame IntegerReturn the tile index for the specified frame of the specified state of the SpriteTemplate.[Let] MyInteger = oSpriteDef.StateFrame(State Integer, Frame Integer)
StateFrameCount IntegerReturn the number of frames for the specified state in the SpriteDef's Template.[Let] MyInteger = oSpriteDef.StateFrameCount(State Integer)
StateTilesetDef TileSetDefReturn the TileSetDef object used by the specified sprite state in the SpriteDef's SpriteTemplate.Set My_TileSetDef = oSpriteDef.StateTilesetDef(State Integer)
Template SpriteTemplateReference to the SpriteTemplate object used by this SpriteDef.Set My_SpriteTemplate = oSpriteDef.Template
Set oSpriteDef.Template = My_SpriteTemplate

Methods

NameReturnDescriptionSyntax
Clone SpriteDef Create and return a copy of this SpriteDef. Set My_SpriteDef = oSpriteDef.Clone
Load Variant Load a SpriteDef from a binary (map) file. [Let] MyVariant = oSpriteDef.Load(nFileNum Integer)
LoadTiles Load into display memory all the tilesets required to draw sprites of this SpriteDef. oSpriteDef.LoadTiles(Disp IBMDXDisplay3)
MakeInstance Sprite Create and return a new instance of this sprite (must be added to layer to be automatically processed). Set My_Sprite = oSpriteDef.MakeInstance
ReleaseRefs Release all references this SpriteDef has to other objects (to avoid circular reference problems). oSpriteDef.ReleaseRefs
Save Variant Save this SpriteDef to a binary (map) file. [Let] MyVariant = oSpriteDef.Save(nFileNum Integer)
SolidTest Boolean Test whether the layer is solid at the given coordinate, according to the template's solidity definition. [Let] MyBoolean = oSpriteDef.SolidTest(XPos Long, YPos Long)

SpriteTemplate Object

Defines detailed parameters about a type of sprite including motion, graphics, states, collisions, etc. Indexed and owned by map.

Properties

NameTypeDescriptionSyntax
AnimSpeed ByteHow many frames of a particular image are displayed before switching to the next image.[Let] MyByte = oSpriteTemplate.AnimSpeed
[Let] oSpriteTemplate.AnimSpeed = MyByte
CollClass IntegerEach bit (n=0-15) represents whether sprites of this template are a member of collision class #n.[Let] MyInteger = oSpriteTemplate.CollClass
[Let] oSpriteTemplate.CollClass = MyInteger
ControlType Enum eControlTypeIndicates what controls the motion of this sprite.[Let] MyeControlType = oSpriteTemplate.ControlType
[Let] oSpriteTemplate.ControlType = MyeControlType
Flags IntegerCombined bits from eTemplateFlagBits.[Let] MyInteger = oSpriteTemplate.Flags
[Let] oSpriteTemplate.Flags = MyInteger
GravPow ByteGravity: 0=strong up, 10=none, 20=strong down.[Let] MyByte = oSpriteTemplate.GravPow
[Let] oSpriteTemplate.GravPow = MyByte
Inertia BytePercent of DX, DY (velocity) retained by a sprite after each frame (0-100) when not accelerating.[Let] MyByte = oSpriteTemplate.Inertia
[Let] oSpriteTemplate.Inertia = MyByte
JumpHeight ByteSpeed, in pixels per frame, that the sprite will move when player presses direction against gravity. (Overrides MoveSpeed.)[Let] MyByte = oSpriteTemplate.JumpHeight
[Let] oSpriteTemplate.JumpHeight = MyByte
MoveSpeed ByteMaximum velocity to which this sprite can propel itself in pixels per frame, except for jump height. (That and gravity, etc. can exceed this speed.)[Let] MyByte = oSpriteTemplate.MoveSpeed
[Let] oSpriteTemplate.MoveSpeed = MyByte
Name StringName of this SpriteTemplate as indexed by the map.[Let] MyString = oSpriteTemplate.Name
[Let] oSpriteTemplate.Name = MyString
SolidInfo SolidDefReference to the SolidDef describing which tile indexes on a sprite's layer it sees as solid.Set My_SolidDef = oSpriteTemplate.SolidInfo
Set oSpriteTemplate.SolidInfo = My_SolidDef
StateCount IntegerSet/get the number of sprite states in this template.[Let] oSpriteTemplate.StateCount = MyInteger
[Let] MyInteger = oSpriteTemplate.StateCount
StateFrame IntegerReturn the tile index for the specified frame of the specified state.[Let] MyInteger = oSpriteTemplate.StateFrame(State Integer, Frame Integer)
StateFrameCount IntegerReturn the number of animation frames for the specified sprite state.[Let] MyInteger = oSpriteTemplate.StateFrameCount(State Integer)
StateTilesetDef TileSetDefSet/get the TileSetDef containing graphics for the specified state's frames.Set oSpriteTemplate.StateTilesetDef(State Integer) = My_TileSetDef
Set My_TileSetDef = oSpriteTemplate.StateTilesetDef(State Integer)
StateType Enum eStateTypeIndicates the type/number of states this sprite contains from a pre-defined set supported by Sprite.Advance.[Let] MyeStateType = oSpriteTemplate.StateType
[Let] oSpriteTemplate.StateType = MyeStateType
TargetClass IntegerFor a sprite that follows nearest sprite, specifies the classes (bits 0-15) of sprite to follow. 0=All[Let] MyInteger = oSpriteTemplate.TargetClass
[Let] oSpriteTemplate.TargetClass = MyInteger

Methods

NameReturnDescriptionSyntax
AppendStateFrame Add a new tile to the animation/image for a particular sprite state. oSpriteTemplate.AppendStateFrame(State Integer, Frame Integer)
ClearState Erase all frames from a particular sprite state animation/image. oSpriteTemplate.ClearState(State Integer)
Clone SpriteTemplate Return a copy of this SpriteTemplate. Set My_SpriteTemplate = oSpriteTemplate.Clone
GetIndexes Integer Return the index of this template as indexed by the map, and set IndexOfMap to the index of the sprite's map within the project. [Let] MyInteger = oSpriteTemplate.GetIndexes(IndexOfMap Integer)
Load Load a SpriteTemplate from a binary (map) file. oSpriteTemplate.Load(nFileNum Integer)
LoadTiles Load into display memory all the graphics required to display sprites of this template. oSpriteTemplate.LoadTiles(Disp IBMDXDisplay3)
ReleaseRefs Release all references this SpriteTemplate has to other objects (to avoid circular reference problems). oSpriteTemplate.ReleaseRefs
Save Save this SpriteTemplate to a binary (map) file. oSpriteTemplate.Save(nFileNum Integer)

TileEdit Object

Full screen tileset editor class. Not persistent or owned.

Properties

NameTypeDescriptionSyntax
AAOn BooleanTrue if Anti-Aliasing is turned on for rotation.[Let] MyBoolean = oTileEdit.AAOn
[Let] oTileEdit.AAOn = MyBoolean
bGrid BooleanTrue if the grid should be drawn in the magnified view.[Let] MyBoolean = oTileEdit.bGrid
[Let] oTileEdit.bGrid = MyBoolean
ClipLeft LongThe left coordinate of where the copied image is drawn.[Let] MyLong = oTileEdit.ClipLeft
[Let] oTileEdit.ClipLeft = MyLong
ClipTop LongThe top coordinate of where the copied image is drawn.[Let] MyLong = oTileEdit.ClipTop
[Let] oTileEdit.ClipTop = MyLong
CurCell IntegerThe index of the currently selected tile in the tileset.[Let] MyInteger = oTileEdit.CurCell
[Let] oTileEdit.CurCell = MyInteger
CurPalEntry IntegerThe index of the currently selected color in the palette.[Let] MyInteger = oTileEdit.CurPalEntry
[Let] oTileEdit.CurPalEntry = MyInteger
CurTool IntegerNumber indicating the currently selected drawing tool/mode.[Let] MyInteger = oTileEdit.CurTool
[Let] oTileEdit.CurTool = MyInteger
Disp IBMDXDisplay3BMDXDisplay object being used by the tile editor if it's active.Set MyIBMDXDisplay3 = oTileEdit.Disp
Set oTileEdit.Disp = MyIBMDXDisplay3
EditResolution Enum ResolutionDetermines the screen mode of the tileset editor.[Let] MyResolution = oTileEdit.EditResolution
[Let] oTileEdit.EditResolution = MyResolution
GridLeft IntegerThe left coordinate of the magnified tile view.[Let] MyInteger = oTileEdit.GridLeft
[Let] oTileEdit.GridLeft = MyInteger
GridTop IntegerThe top coordinate of the magnified tile view.[Let] MyInteger = oTileEdit.GridTop
[Let] oTileEdit.GridTop = MyInteger
hDC LongThe handle to the device context for the display if it is locked.[Let] MyLong = oTileEdit.hDC
[Let] oTileEdit.hDC = MyLong
HorizontalResolution IntegerReturns the width of the display in pixels, based on EditResolution.[Let] MyInteger = oTileEdit.HorizontalResolution
ImageLeft LongThe left coordinate of the un-magnified image.[Let] MyLong = oTileEdit.ImageLeft
[Let] oTileEdit.ImageLeft = MyLong
ImageTop LongThe top coordinate of the un-magnified image.[Let] MyLong = oTileEdit.ImageTop
[Let] oTileEdit.ImageTop = MyLong
Magnify IntegerThe magnification level of the grid (linear grid pixels per image pixel).[Let] MyInteger = oTileEdit.Magnify
[Let] oTileEdit.Magnify = MyInteger
MouseX IntegerCurrent mouse X coordinate.[Let] MyInteger = oTileEdit.MouseX
[Let] oTileEdit.MouseX = MyInteger
MouseY IntegerCurrent mouse Y coordinate.[Let] MyInteger = oTileEdit.MouseY
[Let] oTileEdit.MouseY = MyInteger
PalCellHeight IntegerHeight of a cell in the palette.[Let] MyInteger = oTileEdit.PalCellHeight
[Let] oTileEdit.PalCellHeight = MyInteger
PalCellWidth IntegerWidth of a cell in the palette.[Let] MyInteger = oTileEdit.PalCellWidth
[Let] oTileEdit.PalCellWidth = MyInteger
PalCols IntegerNumber of columns in the palette.[Let] MyInteger = oTileEdit.PalCols
[Let] oTileEdit.PalCols = MyInteger
PalEntry LongSet/get the color for a particular entry in the palette.[Let] MyLong = oTileEdit.PalEntry(Index Integer)
[Let] oTileEdit.PalEntry(Index Integer) = MyLong
PalLeft LongLeft coordinate of the palette display.[Let] MyLong = oTileEdit.PalLeft
[Let] oTileEdit.PalLeft = MyLong
PalRows IntegerNumber of rows in the palette display.[Let] MyInteger = oTileEdit.PalRows
[Let] oTileEdit.PalRows = MyInteger
PalTop LongTop coordinate of the palette display.[Let] MyLong = oTileEdit.PalTop
[Let] oTileEdit.PalTop = MyLong
RotAngle IntegerCurrently selected angle of rotation.[Let] MyInteger = oTileEdit.RotAngle
[Let] oTileEdit.RotAngle = MyInteger
RotX LongX coordinate for the rotated image info.[Let] MyLong = oTileEdit.RotX
[Let] oTileEdit.RotX = MyLong
RotY LongY coordinate for the rotated image info.[Let] MyLong = oTileEdit.RotY
[Let] oTileEdit.RotY = MyLong
SecPalEntry IntegerIndex of the currently selected secondary palette color.[Let] MyInteger = oTileEdit.SecPalEntry
[Let] oTileEdit.SecPalEntry = MyInteger
TilePicture PictureSet a new tile image into the grid/editor.Set oTileEdit.TilePicture = MyPicture
TileRows IntegerNumber of rows in the tileset being edited.[Let] MyInteger = oTileEdit.TileRows
[Let] oTileEdit.TileRows = MyInteger
TileSetBitmap PictureReturn the image of the tileset currently being edited.Set MyPicture = oTileEdit.TileSetBitmap
Translucent IntegerCurrent translucency setting (0-100).[Let] MyInteger = oTileEdit.Translucent
[Let] oTileEdit.Translucent = MyInteger
TSViewHeight IntegerHeight if the tileset view window.[Let] MyInteger = oTileEdit.TSViewHeight
[Let] oTileEdit.TSViewHeight = MyInteger
TSViewLeft IntegerLeft coordinate of the tileset view window.[Let] MyInteger = oTileEdit.TSViewLeft
[Let] oTileEdit.TSViewLeft = MyInteger
TSViewTop IntegerTop coordinate of the tileset view window.[Let] MyInteger = oTileEdit.TSViewTop
[Let] oTileEdit.TSViewTop = MyInteger
TSViewWidth IntegerWidth of the tileset view window.[Let] MyInteger = oTileEdit.TSViewWidth
[Let] oTileEdit.TSViewWidth = MyInteger
VerticalResolution IntegerReturns the height of the display in pixels, based on EditResolution.[Let] MyInteger = oTileEdit.VerticalResolution

Methods

NameReturnDescriptionSyntax
CalcButtons Calculate appropriate sizes for all the buttons based on their text. oTileEdit.CalcButtons
CalcPix Boolean Given an X,Y screen coordinate, translate it into X,Y pixel on the image, return false if not on the image. [Let] MyBoolean = oTileEdit.CalcPix(X Integer, Y Integer, XPix Integer, YPix Integer)
CalcRotSize Calculate the dimensions of the specified rectangle after rotating by the currently selected angle. oTileEdit.CalcRotSize(Wid Integer, Hgt Integer, RWid Double, RHgt Double)
ColorToRGB Split a color into its RGB components. oTileEdit.ColorToRGB(Colr Long, R Integer, G Integer, B Integer)
ColorToRGBByte Split a color into its RGB components output as bytes. oTileEdit.ColorToRGBByte(Colr Long, R Byte, G Byte, B Byte)
CopyBuf Copy a portion of the background buffer onto the foreground buffer of the display, or vice versa. oTileEdit.CopyBuf(ForeToBack Boolean[, X Integer][, Y Integer][, Width Integer][, Height Integer])
Create Start the tileset editor creating a new tileset image. oTileEdit.Create(TileWidth Integer, TileHeight Integer, RowCount Integer, ColCount Integer)
DeleteGridBuf Delete the buffer for temporary storage of the grid's image. oTileEdit.DeleteGridBuf
DrawAll Draw the entire display. oTileEdit.DrawAll
DrawAngle Draw the currently selected rotation angle value. oTileEdit.DrawAngle
DrawButton Draw the specified button in the specified pushed state. oTileEdit.DrawButton(Index Integer, State Boolean)
DrawClip Draw the copied image (clipboard). oTileEdit.DrawClip
DrawCoord Draw the values indicating the location of the mouse over the tile image. oTileEdit.DrawCoord
DrawGrid Draw the grid if it's enabled. oTileEdit.DrawGrid
DrawMagPixel Draw a magnified pixel at the specified image coordinates. oTileEdit.DrawMagPixel(XOff Integer, YOff Integer)
DrawMouse Draw the mouse cursor. oTileEdit.DrawMouse
DrawPalette Draw the color palette. oTileEdit.DrawPalette
DrawRGB Draw the RGB values of the currently selected color. oTileEdit.DrawRGB
DrawTileset Draw the tile selection "window" onto the display. oTileEdit.DrawTileset
Edit Start the tile editor using an existing tileset. oTileEdit.Edit(EditTiles Picture, TileWidth Integer, TileHeight Integer)
FlipClip Invert the copied/clipboard image horizontally (1) or vertically (2). oTileEdit.FlipClip(Ax Integer)
GridPress Handle a mouse action on the image. Action may be 1=MouseDown, 2=MouseMove or 3=MouseUp. oTileEdit.GridPress(X Integer, Y Integer, Action Integer, Button Integer)
InitButtons Create all the buttons in their initial locations with the initial text. oTileEdit.InitButtons
InitPalette Set up the initial set of colors. oTileEdit.InitPalette
InitScreen Initialize components of the display that are based on the tileset. oTileEdit.InitScreen
LoadTile Retrieve a tile from the tileset into the grid/editor. oTileEdit.LoadTile(Index Integer)
MakeBlankTile Load the grid/editor with an empty tile. oTileEdit.MakeBlankTile(TileWidth Variant, TileHeight Variant)
MakeGridBuf Create a buffer to temporarily store the image of the grid. oTileEdit.MakeGridBuf
OverPalCell Integer Returns the palette index under the mouse, -1 if none. [Let] MyInteger = oTileEdit.OverPalCell(X Integer, Y Integer)
Palette16Bit Force the entries in the palette to be compatible with 16-bit color (so floodfill doesn't dither). oTileEdit.Palette16Bit
PicShift Shift the pixels in the editor image. oTileEdit.PicShift(DX Integer, DY Integer)
PressThrough Copy the grid and/or un-magnified image from the back buffer to the front buffer. oTileEdit.PressThrough([Small Boolean = True][, Mag Boolean = True])
PushUndo Add the current image to the undo stack. oTileEdit.PushUndo
Redo Process the Redo button. oTileEdit.Redo
RestoreGrid Restore the stored image of the grid area. oTileEdit.RestoreGrid
RestoreMouseBack Restore the graphics behind the mouse pointer. oTileEdit.RestoreMouseBack
RotateClip Rotate the copied image (clipboard) onto the display. ClipArea: 1=Grid, 2=un-magnified image. oTileEdit.RotateClip(XDest Long, YDest Long, bErase Boolean, ClipArea Integer[, bMagnify Boolean = False])
SaveMouseBack Store the graphics behind the mouse pointer. oTileEdit.SaveMouseBack
SaveTile Store the tile in the editor to the tileset. oTileEdit.SaveTile(Index Integer)
SetClipping 0=No clipping, 1=Clip to grid, 2=Clip to un-magnified image. oTileEdit.SetClipping(Area Integer)
StoreGrid Store the magnified (grid) image into the grid buffer. oTileEdit.StoreGrid
TileSetPress Handle a mouse click on the tileset window (select a tile). oTileEdit.TileSetPress(X Integer, Y Integer)
TriggerButton Handle the action for a button. oTileEdit.TriggerButton(Index Integer)
Undo Handle the Undo button oTileEdit.Undo
UpdateCurButton If the mouse was pressed on a button, draw a pressed button if the mouse is still over it, otherwise draw an up button. oTileEdit.UpdateCurButton

Events

NameDescriptionSyntax
OnEditComplete Fired when the close button is clicked. Sub oTileEdit_OnEditComplete()
OnEditInit Fired after the editor is initialized. Sub oTileEdit_OnEditInit()
OnKeyPress Fired when a key is pressed. Sub oTileEdit_OnKeyPress(KeyAscii Integer)
OnMouseDown Fired when the mouse is pressed. Sub oTileEdit_OnMouseDown(Button Integer, Shift Integer, X Integer, Y Integer)
OnMouseMove Fired when the mouse moves. Sub oTileEdit_OnMouseMove(Button Integer, Shift Integer, X Integer, Y Integer)
OnMouseUp Fired when the mouse is released. Sub oTileEdit_OnMouseUp(Button Integer, Shift Integer, X Integer, Y Integer)

TileGroup Object

Simplified (nameless) component of a Category object for generically describing a collection of tiles. Persistence depends on owner -- never persistent by itself.

Properties

NameTypeDescriptionSyntax
RawByte ByteReturn a byte (0-31) used to store the bits of the tilegroup.[Let] MyByte = oTileGroup.RawByte(ByteIndex Integer)

Methods

NameReturnDescriptionSyntax
ClearAll Clear this to an empty TileGroup oTileGroup.ClearAll
ClearMember Remove a particular member from the group. oTileGroup.ClearMember(TileIndex Integer)
Deserialize Load a TileGroup from a string as stored in the project file. oTileGroup.Deserialize(Data String)
GetArray Variant Return an array of all tile indexes in the TileGroup. [Let] MyVariant = oTileGroup.GetArray
GetMember Integer Get tile number MemberIndex from the group. [Let] MyInteger = oTileGroup.GetMember(MemberIndex Integer)
IsEmpty Boolean Return true if there are no members. [Let] MyBoolean = oTileGroup.IsEmpty
IsMember Boolean Return True if the specified tile index is a member of the TileGroup. [Let] MyBoolean = oTileGroup.IsMember(TileIndex Integer)
MergeFrom Merge the members of another TileGroup into this TileGroup. oTileGroup.MergeFrom(TG TileGroup)
Serialize String Store the TileGroup into a string for the Project file. [Let] MyString = oTileGroup.Serialize
SetAll Turns on all bits; make every index from 0 to 255 return True for IsMember. oTileGroup.SetAll
SetMember Set the specified tile index as a member of this TileGroup. oTileGroup.SetMember(TileIndex Integer)

TileMatch Object

Simplified (nameless) component of a MatchDef object. Persistent in the project only as a component of a MatchDef.

Properties

NameTypeDescriptionSyntax
MatchGroup TileGroupReturn one of the 15 TileGroup objects from the MatchDef, based on index.Set My_TileGroup = oTileMatch.MatchGroup(GroupIndex Byte)

Methods

NameReturnDescriptionSyntax
ClearMember Variant Remove the specified tile from the specified group. [Let] MyVariant = oTileMatch.ClearMember(GroupIndex Integer, TileIndex Integer)
Deserialize Load a TileMatch object from a string. oTileMatch.Deserialize(Data String)
IsMember Boolean Return True if the specified tile index is a member of some group in the TileMatch. [Let] MyBoolean = oTileMatch.IsMember(TileIndex Integer)
Serialize String Store the TileMatch object to a string for the Project file. [Let] MyString = oTileMatch.Serialize
SetMember Variant Set the specified tile index as a member of the specified group. [Let] MyVariant = oTileMatch.SetMember(GroupIndex Integer, TileIndex Integer)

TileReactions Enumeration

Members

NameValue
REACT_NONE0
REACT_ADDTOINVENTORY1
REACT_SUBTRACTFROMINVENTORY2
REACT_USEINVENTORY3

TileSetDef Object

Describes the parameters and filename (bitmap) of a tileset. Indexed and owned by project.

Properties

NameTypeDescriptionSyntax
Image PictureThe picture of this tileset (if IsLoaded).Set MyPicture = oTileSetDef.Image
Set oTileSetDef.Image = MyPicture
ImagePath StringPath to the image file (if saved).[Let] MyString = oTileSetDef.ImagePath
[Let] oTileSetDef.ImagePath = MyString
IsDirty BooleanTrue if TileSetDef has not been saved since last change.[Let] MyBoolean = oTileSetDef.IsDirty
[Let] oTileSetDef.IsDirty = MyBoolean
IsLoaded BooleanTrue if the graphics for this TileSetDef are loaded.[Let] MyBoolean = oTileSetDef.IsLoaded
LoadedInstance IBMDXTileSetIf the graphics are loaded into display memory, return the existing BMDXTileset.Set MyIBMDXTileSet = oTileSetDef.LoadedInstance
Set oTileSetDef.LoadedInstance = MyIBMDXTileSet
Name StringThe name of this TileSetDef as indexed by the project.[Let] MyString = oTileSetDef.Name
[Let] oTileSetDef.Name = MyString
TileHeight IntegerGet/set the height of the tiles in this tileset.[Let] MyInteger = oTileSetDef.TileHeight
[Let] oTileSetDef.TileHeight = MyInteger
TileWidth IntegerGet/set the width of the tiles in this tileset.[Let] MyInteger = oTileSetDef.TileWidth
[Let] oTileSetDef.TileWidth = MyInteger

Methods

NameReturnDescriptionSyntax
Deserialize Load a TileSetDef from a string. oTileSetDef.Deserialize(Data String)
GetIndex Integer Find the index of this TileSetDef in the Project. [Let] MyInteger = oTileSetDef.GetIndex
Load Load the graphics for this TileSetDef from ImagePath. oTileSetDef.Load
Save Save the graphics of this TileSetDef to an image file (ImagePath). oTileSetDef.Save
Serialize String Store the parameters of this TileSetDef to a string for the project file. [Let] MyString = oTileSetDef.Serialize
Unload Unload the graphics for this tileset from memory. oTileSetDef.Unload