English (United Kingdom) Hebrew

Event Editor

The event editor lets the user define what action will be executed when certain event occurs. This editor is only available in program editing mode.

If you look at the event panel, you'll probably see at least one event: the When the world starts event. This event is automatically created for new worlds, although it can be changed or deleted. It instructs Mama to call a certain method (normally the main method) when the world starts - thus, defining the entry point to the program.

You can create new events by clicking on the button create new event at the top of the event editor. A drop down menu will let select the type of the event, and after selecting the new event will show up in the events area. Depending on the event type, you will be able to further select what to do upon occurring of the event:
  • When the world starts - which method to call on start playing the world
  • When a key is typed - which key will activate which method
  • When mouse is clicked on something - select object that's when clicked, will activate the given method
  • While something is true - which method to call when a boolean variable becomes true: you can set here three different methods to be called upon the variable becoming true (Begin), while the variable is true (During), and upon the variable stops being true, i.e becoming false (End).
  • When a variable changes - which method to call when a certain variable's value is changed
In addition, several events let you control the movement of objects using the mouse or the keyboard:
  • let mouse move <objects>
  • let the arrow keys move <subject>
  • let mouse move the camera
  • let mouse orient the camera