Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ragacakaci |
func _process(delta):
if reach.is_colliding():
if reach.get_collider().get_name() == “Gun A”:
weapon_to_spawn = gun_a_hr.Instance()
elif reach.get_collider().get_name() == “Gun B”:
weapon_to_spawn = gun_b_hr.Instance()
else:
weapon_to_spawn = null
else: ( HERE IS ERROR)
weapon_to_spawn = null
if hand.get_child(0) != null:
if hand.get_child(0).get_name() = "Gun A HR":
weapon_to_drop = gun_a.instance()
elif hand.get_child(0).get_name() == "Gun B HR":
weapon_to_drop = gun_b.instance()
else:
weapon_to_drop = null