I am trying to make a pull player on hit function, but i need (Target: fort_character) and (Agent:agent). but i just get errors.
(Target: fort_character).ActivateKnockBackEffect(Agent:agent):void =
if(Fort:=Agent.GetFortCharacter[]):
option:
Yaw := Fort.GetViewRotation().GetYawPitchRollDegrees()[0]
Pitch := 0.0
Roll := 0.0
NewRotation := MakeRotationFromYawPitchRollDegrees(Yaw,Pitch,Roll)
if(MM_Mover.TeleportTo[Target.GetTransform().Translation - vector3{Z:=120.0},NewRotation]):
# Sleep(0.1)
# MM.Activate(Agent)
# Sleep(0.1)
option:
MM_Mover.TeleportTo[MM_Mover.GetTransform().Translation - vector3{Z:=500.0},MM_Mover.GetTransform().Rotation]
OnPlayerDamage(DamageResult : damage_result): void =
if:
Instigator := DamageResult.Instigator?
Agent := Instigator.GetInstigatorAgent[]
Target := fort_character[DamageResult.Target]
then:
ActivateKnockBackEffect(Target)