Jump to content

Home

Force power damage


Ferc Kast

Recommended Posts

While recently looking at the source code of my Lightning Crush force power released a few years back, I remembered that I wanted the damage to be determined by the dc-20 system (or whatever system KotOR uses for damage.) But, I never figured it out before releasing it. Does anyone know how to do that? :confused: I just don't like having it use a specific variable amount for its' damage. So, I would appreciate any pointers on how to accomplish this. :)

 

Here's the current code for it:

void main () {
  /********************************************/
  /*    Defines the caster and the target     */
  /********************************************/
    object oCaster = OBJECT_SELF;
    object oTarget = GetSpellTargetObject();
  /**************************/
  /*   Defines the effects  */
  /**************************/
   effect eLightning = EffectBeam(2038, oCaster, 3);
   effect eCrush = EffectCrush(); 
   effect eDrop = EffectForcePushed();
   effect eDamage = EffectDamage(40, 128);
  /**************************/
  /*   Applies the effects  */
  /**************************/
   ApplyEffectToObject(1, eLightning, oTarget, 2.0f);
   ApplyEffectToObject(1, eCrush, oTarget, 2.0f);
   DelayCommand(0.5, ApplyEffectToObject(1, eDrop, oTarget, 2.0f));
   ApplyEffectToObject(0, eDamage, oTarget);
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...