35174b67ab
The user did not want anything firing: the bullets should simply exist in the air as fixed obstacles. bullet_ring (the emitter) is deleted and bullet_field takes its place. bullet_field generates concentric rings of frozen bullets centred on itself, radii given in cells (default 5/10/15), and skips bullets that fall outside the level bounds or land inside solid tiles so nothing is buried in the terrain. Each bullet is a StaticBody2D on the world layer, so it blocks the player and can be stood on; damage defaults to 0 (pure obstacle) and can be raised to turn them into hazards.
8 lines
198 B
Plaintext
8 lines
198 B
Plaintext
[gd_scene load_steps=2 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scripts/bullet_field.gd" id="1_field"]
|
|
|
|
[node name="BulletField" type="Node2D"]
|
|
z_index = 5
|
|
script = ExtResource("1_field")
|