Jump to content

Home

Some script questions


Exile007

Recommended Posts

Ok, in the mod the PC will need to use a forcepower on a npc while still in the dialog. I scripted a force power set the damage and yeah it fires fine, but the npc isn't effected at all, here is the script.

 

 

Code:

 

void main()

{

object oSource = OBJECT_SELF;

object oTarget = GetSpellTargetObject();

 

effect eBeam = EffectBeam(2026, oSource, 3);

effect eVFX = EffectVisualEffect(1014);

effect eSource = EffectVisualEffect(1014);

effect eDamage = EffectDamage(1000000);

 

ApplyEffectToObject(1, eBeam, oTarget, 5.0f);

ApplyEffectToObject(1, eVFX, oTarget, 8.0f);

ApplyEffectToObject(1, eSource, oSource, 2.0f);

 

}

 

 

 

 

Did I do anything wrong?

Link to comment
Share on other sites

Ok, in the mod the PC will need to use a forcepower on a npc while still in the dialog. I scripted a force power set the damage and yeah it fires fine, but the npc isn't effected at all, here is the script.

(snip)

Did I do anything wrong?

 

You are not applying the damage effect, just the beam and visual ones. :)

 

 

(If this is only meant to be used once automatically during dialog you could just script the whole thing entirely in a dialog action script so you won't have to add it as a real force power.)

Link to comment
Share on other sites

effect eBeam = EffectBeam(2026, oSource, 3);

effect eVFX = EffectVisualEffect(1014);

effect eSource = EffectVisualEffect(1014);

effect eDamage = EffectDamage(1000000);

 

ApplyEffectToObject(1, eBeam, oTarget, 5.0f);

ApplyEffectToObject(1, eVFX, oTarget, 8.0f);

ApplyEffectToObject(1, eSource, oSource, 2.0f);

 

Notice that the first list is one item longer than the second? You declared the action for eDamage, but you never called it into effect.

 

I think that is what Master Stoffe was referring to.

Link to comment
Share on other sites

As qui_gon_glenn said, you just forgot to apply the effect, try this;

void main()
{
object oSource = OBJECT_SELF;
object oTarget = GetSpellTargetObject();

effect eBeam = EffectBeam(2026, oSource, 3);
effect eVFX = EffectVisualEffect(1014);
effect eSource = EffectVisualEffect(1014);
effect eDamage = EffectDamage(1000000);

ApplyEffectToObject(1, eBeam, oTarget, 5.0f);
ApplyEffectToObject(1, eVFX, oTarget, 8.0f);
ApplyEffectToObject(1, eSource, oSource, 2.0f);
ApplyEffectToObject(1, eDamage, oTarget, 2.0f);

}

Kind Regards

--Deadly Stream

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...