This package contains the Laser-related Items for Ballex² and BME pro HDRP.
English | 简体中文
Put the whole Assets folder in %USERPROFILE%\AppData\LocalLow\Mushreb\BME Pro HDRP.
Click Scripts → Enable → Enable Laser in the menu bar to enable the Laser system for the current scene.
Tip
If there is no Scripts → Enable → Enable Laser in the menu bar, please restart BME.
These tags only work for non-link items.
AffectedByLaserForce: Only a rigid item with this tag can be affected by the laser force.ReflectLaser: An item with this tag will reflect the laser.IgnoreLaser: An item with this tag will be ignored by the laser.
These tags should be added to Laser_Head sub-items.
CanDestroyItem: A laser with this tag can destroy items withDestroyedByLaserscript.
Warning
The laser system has occupied the LaserInstances variable name in the variables module.
TRY NOT to use this variable name in your own scripts, nor to call variables.clear().
Same as the official balls, but affected by the laser force.
In particular, the IceBall ignores the laser and the SteelBall reflects the laser.
Same as the official box, but affected by the laser force.
A rigid steel block that is affected by the laser force, as well as reflecting the laser.
A rigid ice block that is ignored by the laser.
Same as the official DoublePushBoard_TypeA, but affected by the laser force.
Same as the official DoublePushBoard_TypeB, but affected by the laser force.
Same as the official fence, but affected by the laser force.
Same as the official push board, but affected by the laser force.
Same as the official TBoard, but affected by the laser force.
A rotatable steel board that can reflect the laser.
Basically the same as the official TNT (cannot interact with official machineries, e.g. blowing up the suspension bridge), explodes when hit by the laser, received a strong impact or touched by the player ball with high temperature.
| Variable | Type | Default | Description |
|---|---|---|---|
explodeImpulseRequire |
float | 5 | The minimum impulse required to explode the TNT. |
explodeTempRequire |
float | 200 | The minimum temperature required to explode the TNT. |
explodeForce |
float | 30 | The force applied to the items around the exploded TNT. |
range |
float | 5 | The range of the explosion. Items within this radius will be affected by the explosion. |
damageTable |
float[] | see below | The damage inflicted on player if player is blown up by the TNT. |
The damage inflicted on player depends on the player's ball type.
| Index | Corresponding Ball Type | Default |
|---|---|---|
| 0 | WoodenBall | 10 |
| 1 | StoneBall | 5 |
| 2 | PaperBall | 40 |
| 3 | IceBall | 15 |
| 4 | SteelBall | 2.5 |
| 5 | RubberBall | 8 |
| 6 | BalloonBall | 100 |
| 7 | StickyBall | 15 |
| 8 | SpongeBall | 0 |
| 9 | Others | 10 |
Same as the official LaserLockedDoor in Ballex1.
The first element of Tags in Settings component means the duration (in frames) for
which the laser door opens after being hit by the laser, defaults to 100.
The door will open permanently after being hit by the laser.
Tip
To make the door be affected by the laser force, add the AffectedByLaserForce tag to the Door_Left and Door_Right sub-items.
If there is a ResetOnDeath tag in Tags in Settings component, the door will
be locked again after the player dies. Otherwise, it will remain unlocked (if it had been unlocked before).
A templated item that can be destroyed by the laser with CanDestroyItem tag.
You can change the destroy sfx in AudioPlayer component.
A pure laser that emits laser rays.
| Variable | Type | Default | Description |
|---|---|---|---|
endPosOffsets |
Float3[] | [{x: 0, y: 0, z: 30}] | Each Float3 represents a ray, whose direction and maximum distance can travel depend on the Float3's direction and length. |
force |
[float, float] | [0.5, 1] | The linear (first element) and angular (second element) forces applied to the rigid items with AffectedByLaserForce tag hit by the laser. |
damageTable |
float[] | see below | The damage inflicted on player per frame if player is hit by the laser. |
heatFactor |
float | 2 | The temperature added to the player per frame if player is hit by the laser. The value varies according to player's current temperature. |
chargeFactor |
float | 0.5 | The power added to the player per frame if player is hit by the laser. |
dryFactor |
float | 0.5 | The humidity subtracted from the player per frame if player is hit by the laser. If the temperature of player is lower than -20, the wetness is locked. |
material |
AssetReference | SwitcherGlow_Purple | The material of the laser rays. |
thickness |
float | 1 | The thickness factor of the laser rays. |
stopUpdateDistance |
float | 50 | If the distance between the laser and the player is larger than this value, the laser will stop being updated. If the value is negative, the laser will always be updated. This is for sake of optimizing performance. |
halfSample |
bool | true | If true, the laser will be updated every other frame. This is for sake of optimizing performance. |
asRepeater |
bool | false | If true, the laser won't emit rays unless itself is hit by any laser ray. |
bake |
bool | false | If true, the laser will be baked and never be updated or affect other items during gameplay. This is for decoration. |
The damage inflicted on player depends on the player's ball type.
| Index | Corresponding Ball Type | Default |
|---|---|---|
| 0 | WoodenBall | 0.3 |
| 1 | StoneBall | 0.1 |
| 2 | PaperBall | 100 |
| 3 | IceBall | 0 |
| 4 | SteelBall | 0.025 |
| 5 | RubberBall | 0.3 |
| 6 | BalloonBall | 100 |
| 7 | StickyBall | 0.125 |
| 8 | SpongeBall | 0 |
| 9 | Others | 0.25 |
A static laser that emits laser rays in the positive z-axis direction of its own coordinate system.
You can configure the laser in Laser_Head sub-item.
Same as Laser_Static, but continuously rotates around its own y-axis.
| Variable | Type | Default | Description |
|---|---|---|---|
rotateSpeed |
float | 0.25 | The speed of rotation in degrees per frame. |
Same as Laser_Static, but can be rotated.
Same as Laser_Rotatable, but with a shorter handle.
The double-head versions of the laser. They emit two laser rays in both positive and negative z-axis direction of their own coordinate system.
The repeater versions of the laser.
The repeater versions of the double-head laser.
Self-supplying : If the repeater is hit by its own laser ray, it can still emit rays.
- The
Laseritems are quite "heavy", so use them sparingly. - Try not to use
Laser_Rotatingexcessively. Static lasers have cache mechanisms to ensure their performance, but an always-rotating laser cannot enjoy the same benefits. - Try not to let the laser reflect excessively. Reflecting consumptions are quite high.
- It is recommended to arrange no more than four lasers within a section, as the performance may degrade significantly.
- Extend the distance between sections which have lasers as much as possible so that the lasers in previous sections don't get updated (if
stopUpdateDistanceworks) to optimize performance.
This package is under the MIT license.






































