Wicked-Depths/SPIKE.GD.gd

16 lines
499 B
GDScript3
Raw Permalink Normal View History

2023-12-20 12:32:33 +01:00
extends CharacterBody2D
func _on_area_2d_body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
if body.name == "plr" and body.can_move:
body.can_move = false
var dial = body.get_node("Camera2D/dialogue")
dial.visible = true
dial.dialogue("Erm...","upsidedown",0.5)
await get_parent().proceed
dial.dialogue("Get out of my way...","nervous",0.5)
await get_parent().proceed
dial.dialogue("I HATE spikes in tunnels...", "normal", 0.5)
await get_parent().proceed