reloading works and returns to idle. still need to fix idle scanning

This commit is contained in:
derek
2025-04-22 15:50:59 -05:00
parent e7fd5bd4b3
commit 6217725c19
10 changed files with 73 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ var last_enemy : bool = false
@export var start_health = 3
@export var SPEED = 3.0
@export var turret_look_speed = 6
@export var max_ammo = 5
@export var max_ammo = 10
@export var loot_amount = 2
@export var nav_agent : NavigationAgent3D
@@ -55,7 +55,8 @@ $body/leg4/foot4/foot4outline,
$body/leg4/leg4outline,
$body/bodyoutline]
@onready var health_bar_sprite: Sprite3D = $HealthBarSprite
@onready var servo_audio: AudioStreamPlayer3D = $AUIDO/Servo
@onready var servo_single: AudioStreamPlayer3D = $AUIDO/ServoSingle
@onready var servo_loop: AudioStreamPlayer3D = $AUIDO/ServoLoop
var gravity = 9.8
@@ -73,6 +74,7 @@ var player_last_seen
var knocked = false
var stunned = false
var health
var turret_current_moving_speed
func _ready():
health = start_health
@@ -87,6 +89,9 @@ func _ready():
func _process(delta):
move_and_slide()
turret_current_moving_speed = (turret_look_next.rotation - turret_look.rotation).length()
#if turret_current_moving_speed > 1:
#servo_single.play()
func stun():
@@ -106,9 +111,3 @@ func save():
"health" : health
}
return save_dict
func _on_area_3d_body_entered(body: Node3D) -> void:
pass # Replace with function body.
func _exit_tree() -> void:
get_parent().enemies.erase(self)