I am creating an item Teleporter Rune that can teleport the player up to max 10.0m distance of the target (vector/locations/angles)
(this code is used onactivateitem)
if (sItemResRef == "teleporterrune")
{
location lTransporter = GetItemActivatedTargetLocation();
location lPC = GetLocation(oPC);
if(GetDistanceBetweenLocations(lTransporter, lPC) > 10.0)
{
vector vTransporter = GetPositionFromLocation(lTransporter);
//here I could get the vector, how to calculate PC location +10.0meters from this facing angle?
}
effect eVisualEffect = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisualEffect, lPC);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisualEffect, lTransporter));
DelayCommand(1.0, AssignCommand(oPC, JumpToLocation(lTransporter)));
}
//EDITED
// if new location is a valid location ![]()





Retour en haut







