From 0f32b376031204219d6700d3601354be3d160a16 Mon Sep 17 00:00:00 2001 From: mightypanders Date: Sat, 12 Jun 2021 02:27:58 +0200 Subject: [PATCH] pickup logic --- Guest.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Guest.gd b/Guest.gd index e2346f3..ee615fe 100644 --- a/Guest.gd +++ b/Guest.gd @@ -33,8 +33,10 @@ func _ready(): pass # Replace with function body. func _on_PickUpArea_body_entered(body): - if body.name =="PLAYER": - if body.velocity.x >= PICKUPTRESHOLD or body.velocity.y >= PICKUPTRESHOLD: + print(body.name) + if body.name == "Playa": + print(body.velocity) + if body.velocity.x >= PICKUPTRESHOLD and body.velocity.y >= PICKUPTRESHOLD: emit_signal("picked_up",destinationColor,guestName) # start pickup process @@ -48,4 +50,4 @@ func _on_PickUpArea_area_entered(area): emit_signal("dropped_off_success") else: emit_signal("dropped_off_fail") - \ No newline at end of file +