Jump to content

Home

[K1] Strange visual effects problem


Recommended Posts

I've been having some problems when applying a visual effect to an NPC, the energy field thing that surrounds one during the Drain/Death field Force power (VFX_PRO_DRAIN). But the strange thing is, no matter how long I script the visual effect to last for, it only ever lasts for about a second before disappearing.

 

I've included an example below of what I would use to script this visual effect. I'm wondering if anybody could possibly see any error in the script? Or suggest any alterations that might allow the visual effect to last longer.

 

effect efVisual = EffectVisualEffect(1009);
DelayCommand(0.2, ApplyEffectToObject(1, efVisual, oNPC, 6.0));

 

Thanks for any help in advance. :)

Link to comment
Share on other sites

effect efVisual = EffectVisualEffect(1009);
DelayCommand(0.2, ApplyEffectToObject(1, efVisual, oNPC, 6.0));

Your script is right, I reckon it must be something down to the VFX model? Though since I am not the expert with kotor models, I'll offer a short-term solution.

void GM_VFXDrainDur(object oTarget, float fDuration){
   float i;
   effect eVisual = EffectVisualEffect(1009);
   for ( i = 0.0; i <= fDuration; i = i + 0.5 ){
       DelayCommand(i, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVisual, oTarget, 1.0));
   }
}

void main(){
   DelayCommand(0.2, GM_VFXDrainDur(oNPC, 6.0));
}

Hope that helps ;)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...