So, to be brief, I'm trying to teleport a pawn when it's struck by a projectile (or damaged by any weapon in my game.) .
Right now, I'm trying to just call Pawn.SetLocationPawn.SetLocation in the projectile's ProcessTouch. That's a problem because ProcessTouchProcessTouch will hit any actor, not just a pawn. Additionally, any attempts to check the ProcessTouch'sProcessTouch's "Actor Other" throwsthrow errors.
I've tried a bunch of solutions (including making aan event TakeDamageTakeDamage in the PawnPawn controller class,) but to no avail.
simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal) { if (Other != Instigator) { //This is where the Other.TakeDamage goes if we are using a traditional gun. if (Other == Pawn); { Other.SetLocation(0,0,0); } } Destroy; } This code complains that Pawn'sPawn is a bad expression. How else should I check actor type here?