Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Force power damage

Page: 1 of 1
 Ferc Kast
05-19-2011, 1:09 PM
#1
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);
}
Page: 1 of 1