Overview
The bullet curtain system is a lightweight system that uses a dedicated execution action, “Fire Barrage Bullet,” to fire bullets with minimal functionality. It can fire hundreds of bullets at once, but its features are very limited—you cannot assign visual scripts to bullets or animate them. Collision detection with bullet curtains is only possible through the dedicated condition, “Collide With Barrage Bullet.” It cannot be detected through conventional attack or wall collision detection. For bullets with complex movements, please use the conventional “Fire Bullet” action.
What You Can Do with “Fire Barrage Bullet”
- Choose from firing types: omnidirectional, rapid-fire, or shotgun.
- Specify the firing location.
- Specify the firing target.
- Choose post-firing movement: straight, curved, direction change, split, or homing.
- Specify the bullet’s sprite.
- Bullets automatically rotate according to their movement direction, with 0 degrees (right side) as the front.
- Specify bullet speed. Acceleration and deceleration after firing are also possible.
- Specify hitbox size and collision layer.
- Specify bullet attack power and attributes (note: damage processing is not automatic and must be manually configured).
Examples of Generating “Bullet Curtain Patterns”
“Flower Pattern”
Generate multiple “omnidirectional” + “curved bullets” simultaneously. To create a beautiful pattern, set the curve angles to opposite values—for example, one at +0.3 degrees and another at -0.3 degrees. Adding rotation creates a washing machine effect.
“Grid Pattern”
Use multiple “rapid-fire” + “straight” bullets, setting offsets from the firing location. Adding direction changes or splits may also produce interesting results.
“Player-Targeting”
Set the target to aim at the player. Adding an offset creates bullets that miss the player, while enabling homing creates predictive bullets.
Bullet Curtains and Scripts
You cannot assign scripts to bullets generated by the bullet curtain system. Therefore, you must use “Collide With Barrage Bullet” to implement various behaviors via the script of the object that collides with the bullet.
What You Can Do with “Collide With Barrage Bullet”
- Detect collisions between an object’s “HitArea” and bullet curtain hitboxes. Detection occurs when the “HitArea2D” layer mask matches the bullet curtain’s layer.
- Destroy collided bullet curtains. Useful for bombs or when hit.
- When destroying a bullet curtain, you can transform it into another object or Godot scene with a specified probability. Primarily used for bombs.
- Store the attack power and attributes of the collided bullet curtain into specified variables.
Practical Examples Using “Collide With Barrage Bullet”
“Bomb”
Create a game object with a “HitArea” configured with a layer mask matching the bullet curtain’s layer (this may seem complex, but collision detection cannot be done with AttackArea). Set up a visual script so that the “HitArea” becomes active and disappears at the explosion timing. After the explosion, enable the “Collide With Barrage Bullet” condition with the option to destroy collided bullets.
-
If you want score items to appear when bombs remove bullet curtains:
Specify drop items. Note that the conversion process incurs the same load as generating regular game objects, so spawning many simultaneously may cause performance drops. We recommend setting a low drop rate, such as 10%. -
If you want bombs to also damage enemies:
Simply perform regular damage processing—set up “AttackArea2D” and assign attack power.
“Graze”
Create a dedicated game object for “graze” processing and make it a child node.
- Graze Object Setup:
Set a HitArea larger than the parent object.
Use visual scripts to trigger graze animations or particles and add to the score when “Collide With Barrage Bullet” is triggered.
“Bullet Curtain Damage/Attribute Processing”
Since you cannot use the regular damage system, you must configure it manually.
Store “bullet curtain damage” in Variable A and “bullet curtain attributes” in Variable B.
-
For simple damage application:
In the damage processing state, set the action to “reduce HP by the value of Variable A.” -
For attribute-based effects:
Set transition link conditions to “if Variable B equals a specified value” to branch accordingly.