C#:
function SpawnTargetEffect()
{
local UserInfo info;
local Actor PlayerActor;
local Pawn P;
PlayerActor = GetPlayerActor();
GetUserInfo(m_TargetID, info);
foreach PlayerActor.CollidingActors(class'Pawn', P, 100, info.Loc)
{
if (m_TargetID == P.CreatureID && m_TargetID > 0)
{
if (P.CurRideType != 0 && P.RidePawn.Name == '') // is rider so skip
continue;
targetEmitter = P.Spawn(TargetEmitterClass, P, , P.Location, P.Rotation);
targetEmitter.SetBase(P);
targetEmitter.Emitters[0].Disabled = true;
targetEmitter.Emitters[0].Texture = targetTexture;
targetEmitter.Emitters[0].StartLocationOffset.Z = P.DamageEffectOffset;
return;
}
}
}