Abstract Event class¶
-
class
Event.
Event
(level)[source]¶ Generic Event object all specific Events inherit from.
Parameters: level (Level) – The Level this Event will be used on. -
set_session
(session)[source]¶ Sets the Session the event will be triggered in.
Parameters: session (Session) – The session this Event will be triggered in.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-
Specific Events¶
Teleportation¶
-
class
Event.
Teleport
(level, target_position)[source]¶ Bases:
Event.Event
Teleports to a set location
Parameters: - level (Level) – The Level this Event will be used on.
- target_position (int) – The target of the teleportation.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
Random Teleportation¶
-
class
Event.
RandomTeleport
(level, list_of_target_zones)[source]¶ Bases:
Event.Event
Teleports to a type of zone that is on the given list randomly.
Parameters: -
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-
Port On/Off¶
-
class
Event.
PortOn
(level, port)[source]¶ Bases:
Event.Event
Turns on a port on the Level’s Gramophone.
Parameters: - level (Level) – The Level this Event will be used on.
- port (int) – Which output to use on the device.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-
class
Event.
PortOff
(level, port)[source]¶ Bases:
Event.Event
Turns off a port on the Level’s Gramophone.
Parameters: - level (Level) – The Level this Event will be used on.
- port (str -- 'A', 'B' or 'C') – Which output should be turned off.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
Starting/Stopping bursting¶
-
class
Event.
StartBurst
(level, port, on_time, pause_time)[source]¶ Bases:
Event.Event
Starts bursting a port on the Level’s gramophone.
Parameters: - level (Level) – The Level this Event will be used on.
- port (int) – Which output to use on the device.
- on_time (float) – How long should the port by set to high before a pause.
- pause_time (float) – How long should the pauses be.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-
class
Event.
StopBurst
(level, port)[source]¶ Bases:
Event.Event
Stops bursting a port on the Level’s gramophone.
Parameters: - level (Level) – The Level this Event will be used on.
- port (int) – Which output should stop bursting.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
Pausing/Unpausing¶
-
class
Event.
Pause
(level, pause_position=None)[source]¶ Bases:
Event.Event
Pauses the Level where it is or at a given position.
Parameters: - level (Level) – The Level this Event will be used on.
- pause_position (int or None) – Set to None to pause at current position. None by default.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-
class
Event.
UnPause
(level, unpause_position=None)[source]¶ Bases:
Event.Event
Unpauses the Level where it is or at a given position.
Parameters: - level (Level) – The Level this Event will be used on.
- unpause_position (int or None) – Set to None to pause at current position. None by default.
-
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
Printing messages¶
-
class
Event.
Print
(level, message)[source]¶ Bases:
Event.Event
Prints the given message to the console window.
Parameters: message (str) – The message that will be printed when triggered -
triggerable
¶ Tell whether it makes sense to trigger this event at the moment.
-