MultiBall patch for Ballex².
- Put the whole
Assetsfolder in%USERPROFILE%\AppData\LocalLow\Mushreb\BME Pro HDRP. - Drag the
MultiBallitem into the scene. - If you want MultiBall tips, drag the
MultiBallTipitem into the scene. The tip will show up after first ball appending in the game. - Then you can use the MultiBall related items in BME Pro HDRP like official items.
Warning
MultiBall is currently incompatible with custom ball.
| Variable Name | Type | Description |
|---|---|---|
switchBallKeys |
string[] |
The keys to switch the ball. There are two strings in the array. The first is the key to switch the ball when in Four Direction View Mode, and the second is the key to switch the ball when in Free View Mode or First Person View Mode. |
cameraEase |
bool |
How the camera moves when switching the ball. If set to true, the camera will follow the ball smoothly. If set to false, the camera will jump to the ball's position. |
easeDistance |
float |
This works only when cameraEase is set to true. Only when the distance between the start switching position and the target position is less than this value, the camera will follow the ball smoothly. Otherwise, the camera will jump to the target position. If the value is set to negative, the camera will always follow the ball smoothly. |
| Variable Name | Type | Description |
|---|---|---|
duration |
int |
How long the tip will stay on the screen. The unit is frame. If set to negative, the tip will stay on the screen until the next section. |
Get apis by:
/**
* @import { MultiBallMessage } from "multiBall:message"
* @import { MultiBallManager } from "multiBallApi"
*/
/** @param {*} msg @returns {msg is MultiBallMessage} */
const isMultiBallMessage = msg => msg?._brand === "MultiBallMessage"
/** @type {MultiBallManager} */
let multiBallManager
/** @satisfies {RegisterEvent[]} @typedef {ExpectTrue<IsUnique<typeof registerEvents>>} */
export const registerEvents = /** @type {const} */ (["OnReceiveCustomEvent"])
/** @type {OnEvents<typeof registerEvents>} */
export const onEvents = (self, { OnReceiveCustomEvent }) => {
if (OnReceiveCustomEvent) {
const msg = OnReceiveCustomEvent[0]
if (isMultiBallMessage(msg)) {
if (msg.OnLoadMultiBall) {
multiBallManager = msg.OnLoadMultiBall.multiBallManager
}
}
}
}Tip
Install BST to get type hints.