26 lines
519 B
GDScript
26 lines
519 B
GDScript
extends Area3D
|
|
|
|
@onready
|
|
var _dialog = $"../Kreb/Disappoint"
|
|
@onready
|
|
var _dest = $Dest
|
|
|
|
|
|
var stupid_count = 0
|
|
|
|
|
|
func _on_body_entered(body: Node3D) -> void:
|
|
if not body.is_in_group('players'):
|
|
return
|
|
|
|
_dialog.play()
|
|
_dialog.volume_db = stupid_count * 2.0
|
|
body.global_position = _dest.global_position
|
|
|
|
stupid_count += 1
|
|
|
|
if stupid_count > 3:
|
|
_dialog.reparent(body, false)
|
|
_dialog.max_db = 20.0
|
|
_dialog.volume_db = 20.0
|
|
body.velocity += Vector3.UP * 100.0
|