View Full Version : Offensive Force Powers

09-08-2006, 09:10 PM
I looked around the forums for quite a while and couldnt seem to find anything about scripting offensive (or hostile) force powers. I found a tutorial on it else and thought I would post the results of that tutorial here just so others might benefit from it.

NOTE: This is very, VERY basic and by no means set in stone but is definitely a good place to start

// -------------------------------------------------------
// |Basic tutorial for scripting an OFFENSIVE FORCE POWER|
// -------------------------------------------------------
#include 'k_inc_force'

void main()
object oTarget = GetSpellTargetObject();
int nDamage = GetHitDice(OBJECT_SELF); //Will do 1 damage per force user level.
effect eDamage = EffectDamage(nDamage);
BODY_NODE_CHEST); //(inspired by stoffe -mkb-'s Force Strike script)
//effect eVFX = EffectVisualEffect(3001); Apparently this was lost in translation or the author of the previous file failed to mention something.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oTarget);
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX, oTarget); See effect description for eVFX
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);

Hope this helps and I apologize if any issues come of me posting this.

Lit Ridl
09-09-2006, 02:14 AM
May be more things?
If you need I may help.

09-09-2006, 02:57 AM
My sleep deprivation must be gettin to me because you really lost me lit ridl.

09-09-2006, 05:21 AM
May be more things?
If you need I may help.

SithAnnihilator is not asking a question, Lit ;). He decided to create a tutorial on how to script an offensive Force Power seeing as how one did not exist already. :)