Skip to content

Mapping

Gamepiaynmo edited this page Aug 7, 2020 · 2 revisions

Mapping

转到中文

This section talks about how BML help with Ballance mapping.

Scripts in Map

Currently maps are using the script map template to activate scripts inside map files. The functionality of built-in mod MapScripts is to simplify this progress, and activate scripts with specified names under certain conditions. For example, in the example level of BML, there is one script named BML_OnPostLoadLevel:

Like listening to the message in BML mods, these scripts will be invoked at the same time as the messages are sent. This BML_OnPostLoadLevel script will be activated after the level has finished loading, and its functionality is to change the texture video format to recover the appearance of columns and lanterns.

Here lists all scripts that will be activated:

BML_OnPostLoadLevel
BML_OnStartLevel
BML_OnPreResetLevel
BML_OnPostResetLevel
BML_OnPauseLevel
BML_OnUnpauseLevel
BML_OnPreExitLevel
BML_OnPreNextLevel
BML_OnDead
BML_OnPreEndLevel
BML_OnPostEndLevel
BML_OnCounterActive
BML_OnCounterInactive
BML_OnBallNavActive
BML_OnBallNavInactive
BML_OnCamNavActive
BML_OnCamNavInactive
BML_OnBallOff
BML_OnPreCheckpointReached
BML_OnPostCheckpointReached
BML_OnLevelFinish
BML_OnGameOver
BML_OnExtraPoint
BML_OnPreSubLife
BML_OnPostSubLife
BML_OnPreLifeUp
BML_OnPostLifeUp

Time of these scripts to be activated please refer to API Reference.

Dual Ball Control

On 2020/7/24, Zzq_203 released the first custom map All-We-Know that utilized scripts in map to achieve controlling two player balls, not simultaneously but in turn.

The built-in mod DualBallControl is inspired by this map, and was made for simplifying the progress of making dual ball maps, and implementing functions that are impossible for scripts: smooth camera switching and supporting ball transforming. All you need to do is:

  • Build the entire level just like normal maps, except allocating two spawn points check points for each sector.

  • After exporting into Virtools, duplicate all PS_FourFlames, PC_TwoFlames and PR_ResetPoints, add the suffix "_dual" to their names, but do not send them to any groups:

  • And relocate them to your secondary ball positions:

Then all things are done. You can load the map now and check if it works well. Also you can check the example level which also used this mod to achieve controlling dual balls for reference.