I want to check my Player node against an enemy that is casting a ray. How would is return my Player to get_collider() as a type Object, or what other methods could I possibly use to test for these kinds of conditions?
Your question is confusing. Are you asking how to detect when the player enters the raycast? In that case, use the extends condition with the get_collider() and a preload("player.gd").
So to tell if my player enters the ray and not another object i would use if (get_collider () extendeds preload("my player's script"))?
if (get_collider () extendeds preload("my player's script"))?
I don't think that would work in one line. You must first store the preload result in a variable. But otherwise, yes, that's the idea.