core.components.event.conditions.music module

class core.components.event.conditions.music.Music[source]

Bases: object

music_playing(game, condition)[source]

Checks to see if a particular piece of music is playing or not.

Parameters:
  • game (core.control.Control) – The main game object that contains all the game’s variables.
  • condition (Dictionary) – A dictionary of condition details. See core.components.map.Map.loadevents() for the format of the dictionary.
Return type:

Boolean

Returns:

True or False

Valid Parameters: music_filename

Examples:

>>> condition.__dict__
{
    "type": "music_playing",
    "parameters": [
        "479403_its-a-unix-system.ogg"
    ],
    "width": 1,
    "height": 1,
    "operator": "is",
    "x": 2,
    "y": 2,
    ...
}