Added per enemy taunts and other tweaks
This commit is contained in:
@@ -26,6 +26,8 @@ const MAX_AV = 10
|
||||
@export var health_pickup : Resource
|
||||
@export var die_particles : Resource
|
||||
@export var damage_number : Resource
|
||||
@export_group("Taunts")
|
||||
@export var taunts : Array[String] = []
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var nav_agent = $NavigationAgent3D
|
||||
@@ -108,7 +110,7 @@ func _process(delta):
|
||||
move_and_slide()
|
||||
|
||||
if dying:
|
||||
turret.global_rotation.y += 100 * delta
|
||||
turret.global_rotation.y += 200 * delta
|
||||
#fire(barrel_1)
|
||||
#fire(barrel_2)
|
||||
|
||||
@@ -117,20 +119,16 @@ func _process(delta):
|
||||
|
||||
|
||||
func _on_area_3d_body_part_hit(dam,bullet_damage):
|
||||
health -= dam * bullet_damage
|
||||
print("health: " + str(health))
|
||||
if health <= 0:
|
||||
dying_throws()
|
||||
if !dying:
|
||||
health -= dam * bullet_damage
|
||||
if health <= 0:
|
||||
dying_throws()
|
||||
|
||||
|
||||
func _on_prefire_timer_timeout():
|
||||
#barrel 1 fire
|
||||
fire(barrel_1)
|
||||
#barrel 2 fire
|
||||
fire(barrel_2)
|
||||
|
||||
turret_material.emission_enabled = false
|
||||
|
||||
prefire_timer.stop()
|
||||
postfire_timer.start()
|
||||
|
||||
@@ -205,7 +203,7 @@ func drop_loot(number_of_drops):
|
||||
var av_z = randf_range(-MAX_AV,MAX_AV)
|
||||
|
||||
# Random Item Drop
|
||||
rand_item.position = self.global_position
|
||||
rand_item.position = self.global_position + Vector3(0,2,0) #added height to spawn location since origin is on the ground
|
||||
rand_item.transform.basis = self.global_transform.basis
|
||||
rand_item.linear_velocity += self.global_transform.basis * Vector3(lv_x,lv_y,lv_z)
|
||||
rand_item.angular_velocity += self.global_transform.basis * Vector3(av_x,av_y,av_z)
|
||||
|
||||
Reference in New Issue
Block a user