By George — February 11, 2018
Overwrites character’s victory theme. Can be assigned to a custom sound using
sound_get( sound ) Reference→
or set to one of the ▼ following indexes
CH_ZETTERBURN
CH_ORCANE
CH_WRASTOR
CH_KRAGG
CH_FORSBURN
CH_MAYPUL
CH_ABSA
CH_ETALUS
CH_ORI
CH_RANNO
CH_CLAIREN
CH_SYLVANOS
CH_ELLIANA
CH_SHOVEL_KNIGHT
Argument | Type | Description |
---|
theme | :real | Victory theme index or custom sound ID |
Example, called from load.gml:
set_victory_theme( sound_get( "custom" ));
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Stops the specified sound if it’s playing.
Use either
asset_get( sound ) Reference→
sound_get( sound ) Reference→
to retrieve the ID.
Argument | Type | Description |
---|
soundID | :real | The ID of the game sound to stop |
Example, called from attack_update.gml:
if (window == 3 && window_timer == 1) {
sound_stop(sound_get( "charging_sound" ));
sound_play(sound_get( "release_sound" ));
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Plays the specified sound effect, supports both built-in and custom sounds. Returns the id of the sound played.
Use either
asset_get( sound ) Reference→
sound_get( sound ) Reference→
to retrieve the ID.
Argument | Type | Description |
---|
soundID | :real | The ID of the game sound to play |
looping | :real | (optional) Whether to loop the sound or not. If set to true, be sure to save the id of the sound so you can later stop it with sound_stop( sound ) Reference→ |
panning | :real | (optional) The panning of the sound. Should be between -1 and 1. Using the keyword noone will use normal panning. |
volume | :real | (optional) The volume of the sound. Should be between 0 and 1. |
pitch | :real | (optional) The pitch of the sound, in multiples. 2 will play the sound at double pitch, 0.5 at half pitch, and so on. |
Example, called from attack_update.gml:
if (attack == AT_NSPECIAL) {
if (window == 4 && window_timer == 1) {
sound_play( sound_get( "custom" ) );
}
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the unique index (real) of the sound asset loaded from the /sounds folder (should be in .ogg format).
Argument | Type | Description |
---|
sound | :string | The name of the sound to get the index of |
Example, called from ustrong.gml:
set_hitbox_value( AT_USTRONG, 1, HG_HIT_SFX, sound_get( "custom" ));
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Updates collision mask properties of the sprite asset loaded from the /sprites folder.
Argument | Type | Description |
---|
sprite | :string | The name of the sprite to set the bounding box of |
sepmasks | :real | Whether to create collision masks for each sub-image of the sprite (true) or one mask for all (false) |
bboxmode | :real | The kind of bounding box: 0 = automatic 1 = full image 2 = user defined |
bbleft | :real | The maximum left position of the bounding box |
bbtop | :real | The maximum top position of the bounding box |
bbright | :real | The maximum right position of the bounding box |
bbbottom | :real | The maximum bottom position of the bounding box |
kind | :real | The kind of mask: 0 = precise 1 = bounding box 2 = disk 3 = diamond |
Example, called from init.gml:
sprite_change_offset( "jump", 94, 138 );
sprite_change_collision_mask( "jump", true, 0, 0, 0, 0, 0, 0 );
Categories: Functions, Programming, Workshop | Comments: 0