Here is everything you need to create an ender (forter) pearl in UEFN
using { /Fortnite.com/Abilities }
using { /Fortnite.com/Characters }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /Verse.org/SpatialMath }
using { /UnrealEngine.com/Abilities }
XYZ:= import(/UnrealEngine.com/Temporary/SpatialMath)
template_ability<public> := class(fort_template_ability(ability_context, fort_template_ability_effect)):
var TargetQuery<override>:?ability_target_query := option{self_ability_target_query{}}
var ActiveEffects<override> : []fort_template_ability_effect = array{}
CanUse<override>(AbilityEffectParent : entity, AbilityContext : ability_context)<reads><decides> : void =
true?
MakeContext<override>()<transacts> : ability_context =
ability_context{}
MakeAbility<override>()<transacts> : fort_template_ability_effect =
fort_template_ability_effect{}
forter_pearl_projectile_component<public> := class(fort_projectile_component):
var Speed<override>:float = 3000.0
var Gravity<override>:float = 980.0
LandingOffset : float = 100.0
OnSimulate<override>()<suspends>:void =
Hit := OnImpactEvent.Await()
if:
FC := GetInstigator[].GetFortCharacter[]
FC.TeleportTo[XYZ.FromVector3(Hit.Location + Hit.Normal*LandingOffset), FC.GetViewRotation()]
Entity.RemoveFromParent()