AGEBasic can be executed in a cabinet and you can use special functions to control the cabinet and game behavior.
How to execute AGEBasic programs in response to events related to a specific cabinet.
Age of Joy can be configured to execute AGEBasic programs when the player produces actions on a cabinet, or in events related to a cabinet.
You can find the AGEBasic subdocument specification in the CDL the Cabinet Description Language
Also read the AGEBasic cabinet event system
All AGEBasic programs that run in a cabinet preserve the same variable’s space, that means, you can set a variable in a program and read its value in another program. The variable’s space is initialized when the cabinet loads.
To better understand how AGEBasic works please refer to AGEBasic programing specification.
AGEBasic cabinet programs are packaged within the same file as all the other cabinet assets, such as images or models.
Insert coin event
AGE will execute the program when the player insert a coin in the cabinet for first time (to start a game)
Eg: this program will insert five extra coins after the player insert the first one:
myinsertcoins.bas
- The
cabInsertCoin()
is called five times to insert five coins after the player insert the first one.
To execute this program you should insert this subdocument in the Cabinet’s description.yaml
file:
On Load event
Execute a program when the cabinet is fully loaded.
E.g.: this program will hide (disable) some parts of the cabinet after load
The program will find the joystick, front and marquee parts to disable them.
Eg: save all the parts in a variable string to see it on debug mode.
Read about Debug Mode in AGEBasic programing