Jump to content

Home

Offensive Force Powers


SithAnnihilator

Recommended Posts

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); 
   effect eBeam = EffectBeam(VFX_BEAM_LIGHTNING_DARK_L, OBJECT_SELF, 
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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...