Aller au contenu

Photo

Electrical arc effect


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 988 messages
How do I acheive an electrical arc effect between two points. I want a permanent effect to denote a trap that will switch off when the puzzle is solved.

Thanks in advance,

PJ

#2
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Place down two IPoints for the beginning and end of the beam. Then use this script (or a version of it depending on how you want it to fire off):

void main()
{
object oPC = GetFirstPC(FALSE);
object oBeamStart = GetNearestObjectByTag("BeamStartTag", oPC, 1);
object oBeamEnd = GetNearestObjectByTag("BeamEndTag", oPC, 1);

effect eBeam1 = EffectNWN2SpecialEffectFile("sp_lightning_ray", oBeamEnd);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBeam1, oBeamStart, 3.0f);
}

#3
PJ156

PJ156
  • Members
  • 2 988 messages
Thanks KM I put this on enter and it works just fine.

I don't see a RemoveEffectToObject but I do see a RemoveSEFFToObject.

I want to stop this temporarily when a certain action is called from a convo. I will have a play.

PJ

#4
PJ156

PJ156
  • Members
  • 2 988 messages
I used this script from my convo and the VFX stops for 6 seconds Image IPB

void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = GetObjectByTag("2005_dd_start_arc");
RemoveSEFFromObject(oTarget,"sp_lightning_ray");
object oPC1 = GetFirstPC(FALSE);
object oBeamStart = GetNearestObjectByTag("2005_dd_start_arc", oPC1, 1);
object oBeamEnd = GetNearestObjectByTag("2005_dd_end_arc", oPC1, 1);
effect eBeam1 = EffectNWN2SpecialEffectFile("sp_lightning_ray", oBeamEnd);
DelayCommand(6.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBeam1, oBeamStart, 3.0f));
}

Sorry this thread belongs in scripting but I did not realise this was a scripted solution.

Now to switch off the associated trap,

PJ