Functions
project_load
project_load(path) -> int<collection.CRATE_GAMEMAKER>
- path
string
-> Path to the directory containing a Gamemaker project.
int<collection.CRATE_GAMEMAKER>
project_save
project_save(id)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project.
project_close
project_close(id, save?)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - save
bool
folder_add
folder_add(id, name, folderpath) -> struct<gamemaker.ResourceNode>, string
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the folder asset. - folderpath
string
- Parent path for the folder asset, use an empty string for the root folder. - tags
[]string
- List of tags to assign to the folder.
struct<gamemaker.ResourceNode>
string
- Path to the folder asset.
folder_get
folder_get(id, folderpath) -> struct<gamemaker.ResourceNode>
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - folderpath
string
- Path to the folder asset.
struct<gamemaker.ResourceNode>
folder_delete
folder_delete(id, folderpath)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - folderpath
string
- Path to the folder asset.
folder_exists
folder_exists(id, folderpath) -> bool
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - folderpath
string
- Path to the folder asset.
bool
sprite
sprite(name, width, height, parent, texgroup) -> struct<gamemaker.Sprite>
- name
string
- Name of the sprite asset. - width
int
- height
int
- parent
struct<gamemaker.ResourceNode>
- texgroup
struct<gamemaker.ResourceNode>
struct<gamemaker.Sprite>
sprite_save
sprite_save(id, sprite)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - sprite
struct<gamemaker.Sprite>
sprite_delete
sprite_delete(id, name)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the sprite asset.
sprite_exists
sprite_exists(id, name) -> bool
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the sprite asset.
bool
sprite_load
sprite_load(id, name, encoding) -> struct<gamemaker.Sprite>
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the sprite asset. - encoding
int<image.Encoding
struct<gamemaker.Sprite>
note
note(name, text, parent) -> struct<gamemaker.Note>
- name
string
- Name of the note asset. - text
string
- parent
struct<gamemaker.ResourceNode>
struct<gamemaker.Note>
note_save
note_save(id, note)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - note
struct<gamemaker.Note>
note_delete
note_delete(id, name)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the note asset.
note_exists
note_exists(id, name) -> bool
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the note asset.
bool
note_load
note_load(id, name) -> struct<gamemaker.Note>
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the note asset.
struct<gamemaker.Note>
script
script(name, code, parent) -> struct<gamemaker.Script>
- name
string
- Name of the script asset. - code
string
- parent
struct<gamemaker.ResourceNode>
struct<gamemaker.Script>
script_save
script_save(id, script)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - script
struct<gamemaker.Script>
script_delete
script_delete(id, name)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the script asset.
script_exists
script_exists(id, name) -> bool
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the script asset.
bool
script_load
script_load(id, name) -> struct<gamemaker.Script>
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - name
string
- Name of the script asset.
struct<gamemaker.Script>
datafile_from_file
datafile_from_file(name, filepath, frompath) -> struct<gamemaker.DataFile>
- name
string
- Name of the script asset. - filepath
string
- frompath
string
- File path to read file from. Note that this file is not read until the resource is saved.
struct<gamemaker.DataFile>
datafile_from_string
datafile_from_string(name, filepath, data) -> struct<gamemaker.DataFile>
- name
string
- Name of the script asset. - filepath
string
- data
string
struct<gamemaker.DataFile>
datafile_from_image
datafile_from_image(name, filepath, id) -> struct<gamemaker.DataFile>
- name
string
- Name of the script asset. - filepath
string
- id
int<collection.IMAGE>
struct<gamemaker.DataFile>
datafile_save
datafile_save(id, datafile)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - datafile
struct<gamemaker.DataFile>
datafile_delete
datafile_delete(id, filepath, name)
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - filepath
string
- name
string
datafile_exists
datafile_exists(id, filepath, name) -> bool
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project. - filepath
string
- name
string
bool
project_as_parent
project_as_parent(id) -> struct<gamemaker.ResourceNode>
- id
int<collection.CRATE_GAMEMAKER>
- ID for the loaded Gamemaker project.
struct<gamemaker.ResourceNode>
texgroup_default
texgroup_default() -> struct<gamemaker.ResourceNode>
struct<gamemaker.ResourceNode>
bbox
bbox() -> struct<gamemaker.BBOX>
- top
int
- left
int
- bottom
int
- right
int
struct<gamemaker.BBOX>
Constants
SpriteOrigin
SPRITEORIGIN_TOPLEFT
SPRITEORIGIN_TOPCENTER
SPRITEORIGIN_TOPRIGHT
SPRITEORIGIN_MIDDLELEFT
SPRITEORIGIN_MIDDLECENTER
SPRITEORIGIN_MIDDLERIGHT
SPRITEORIGIN_BOTTOMLEFT
SPRITEORIGIN_BOTTOMCENTER
SPRITEORIGIN_BOTTOMRIGHT
SPRITEORIGIN_CUSTOM
CollMask
COLLMASK_PRECISE
COLLMASK_RECT
COLLMASK_ELLIPSE
COLLMASK_DIAMOND
COLLMASK_PRECISEFRAME
COLLMASK_RECTROT
COLLMASK_SPINE
BBOXMode
BBOXMODE_AUTO
BBOXMODE_FULL
BBOXMODE_MANUAL
NinesliceTile
NINESLICETILE_STRETCH
NINESLICETILE_REPEAT
NINESLICETILE_MIRROR
NINESLICETILE_BLANKREPEAT
NINESLICETILE_HIDE
NinesliceSlice
NINESLICESLICE_LEFT
NINESLICESLICE_TOP
NINESLICESLICE_RIGHT
NINESLICESLICE_BOTTOM
NINESLICESLICE_CENTER
PlaybackUnit
PLAYBACK_PERSECOND
PLAYBACK_PERFRAME
Directories
DIR_DATAFILES
Color
COLOR_AQUA
COLOR_BLACK
COLOR_BLUE
COLOR_DKGRAY
COLOR_FUCHSIA
COLOR_GRAY
COLOR_GREEN
COLOR_LIME
COLOR_LTGRAY
COLOR_MAROON
COLOR_NAVY
COLOR_OLIVE
COLOR_ORANGE
COLOR_PURPLE
COLOR_RED
COLOR_SILVER
COLOR_TEAL
COLOR_WHITE
COLOR_YELLOW
Structs
ResourceNode
- name
string
- filepath
string
Sprite
- name
string
- width
int
- height
int
- parent
struct<gamemaker.ResourceNode>
- texgroup
struct<gamemaker.ResourceNode>
layers
layers(self) -> struct<gamemaker.SpriteLayers>
frames
frames(self) -> struct<gamemaker.SpriteFrames>
tags
tags(self, string...) -> self
tag_list
tag_list(self, []string) -> self
tile
tile(self, htile bool, vtile bool) -> self
origin
origin(self, int<gamemaker.SpriteOrigin>, xorigin int?, yorigin int?) -> self
collision
collision(self, int<gamemaker.BBOXMode>, int<gamemaker.CollMask>, struct<gamemaker.BBOX>?, tolerance int?) -> self
premultiply_alpha
premultiply_alpha(self, bool) -> self
edge_filtering
edge_filtering(self, bool) -> self
dynamic_texturepage
dynamic_texturepage(self, bool) -> self
nineslice
nineslice(self, top int, left int, bottom int, right int) -> self
nineslice_tilemode
nineslice_tilemode(self, int<gamemaker.NineSliceSlice>, int<gamemaker.NineSliceTile>) -> self
broadcast_message
broadcast_message(self, frame int, msg string) -> self
playback
playback(self, speed int, units int<gamemaker.PlaybackUnit>?) -> self
SpriteLayers
image
image(self, name string) -> self
default
default(self) -> self
folder
folder(self, name string) -> struct<gamemaker.SpriteLayerFolder>
back
back(self) -> struct<gamemaker.Sprite>
SpriteLayerImage
- type
string<gamemaker.LayerType>
- name
string
SpriteLayerFolder
- type
string<gamemaker.LayerType>
- name
string
image
image(self, name string) -> self
default
default(self) -> self
folder
folder(self, name string) -> struct<gamemaker.SpriteLayerFolder>
back
back(self) -> struct<gamemaker.SpriteLayers>
SpriteFrames
add
add(self, []int<collection.IMAGE>) -> self
back
back(self) -> struct<gamemaker.Sprite>
Note
- name
string
- text
string
- parent
struct<gamemaker.ResourceNode>
tags
tags(self, string...) -> self
tag_list
tag_list(self, []string) -> self
Script
- name
string
- code
string
- parent
struct<gamemaker.ResourceNode>
tags
tags(self, string...) -> self
tag_list
tag_list(self, []string) -> self
BBOX
- top
int
- left
int
- bottom
int
- right
int
DataFile
- name
string
- filepath
string
- data
string | int<collection.IMAGE>
- datatype
int<gamemaker.DataFileType>