I made a spell wich shows a VFX many times between the caster and the target asi if were some kind of beam, but the vfx are made at ground level, so its not seen totally.... how can i do for make the vfx a little higher? I assume using vectors but not sure how.
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if(nEvent != X2_ITEM_EVENT_ACTIVATE)return;
object oPC = GetItemActivator();
object oT = GetItemActivatedTarget();
location lT = GetLocation(oT);
location lPC = GetLocation(oPC);
vector vPC = GetPosition(oPC);
vector vT = GetPosition(oT);
vector vR = vT-vPC;
float aAng = VectorToAngle(vR);
//Dibujo
float nDist = GetDistanceBetween(oPC, oT);
float nPr = nDist/10;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist, aAng), aAng+180.0));
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr, aAng+180.0), aAng)));
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*2, aAng+180.0), aAng)));
DelayCommand(1.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*3, aAng+180.0), aAng)));
DelayCommand(2.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*4, aAng+180.0), aAng)));
DelayCommand(2.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*5, aAng+180.0), aAng)));
DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*6, aAng+180.0), aAng)));
DelayCommand(3.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*7, aAng+180.0), aAng)));
DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*8, aAng+180.0), aAng)));
DelayCommand(4.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*9,aAng+180.0), aAng)));
DelayCommand(5.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGBLUE), Location(GetArea(oT), GetChangedPosition(GetPosition(oT),nDist-nPr*10, aAng+180.0), aAng)));
}