feat: Add Tekton NPC with roaming behavior, combat reactions, and interaction mechanics including carrying and throwing.
This commit is contained in:
+3
-4
@@ -194,7 +194,7 @@ func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
|
||||
print("[Tekton] Landed/Knocked! Shrinking and waiting... (Intensity: %.1f)" % intensity)
|
||||
|
||||
_flash_damage() # Add visual flash too? Why not.
|
||||
# _flash_damage() # Disabled to prevent tween conflict with shrinking
|
||||
|
||||
# Disable movement/interaction logic temporarily
|
||||
var controller = get_node_or_null("TektonController")
|
||||
@@ -205,14 +205,13 @@ func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
# Use cached meshes if available, else find them (but can't restore accurately if not cached)
|
||||
if mesh_cache.is_empty():
|
||||
# Fallback if _ready hasn't run or failed
|
||||
# We'll just define the user's specific vector as fallback target for the sphere
|
||||
# But better to rely on cache.
|
||||
pass
|
||||
|
||||
for i in range(mesh_cache.size()):
|
||||
var mesh = mesh_cache[i]
|
||||
if is_instance_valid(mesh):
|
||||
var base_scale = original_scales[i]
|
||||
# Kill any existing tweens on this mesh to stop flash_damage or previous effects
|
||||
var t = create_tween()
|
||||
t.tween_property(mesh, "scale", base_scale * 0.5, 0.2).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
|
||||
|
||||
@@ -223,7 +222,7 @@ func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
# Floor Freeze (Visual/Instant - Run on all clients locally)
|
||||
temporarily_change_floor(current_position, 1, 6, 3.0)
|
||||
|
||||
# Wait 3 seconds
|
||||
# Wait 3.0 seconds
|
||||
await get_tree().create_timer(3.0).timeout
|
||||
|
||||
# Grow back
|
||||
|
||||
Reference in New Issue
Block a user