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.

Offensive Force Powers

Page: 1 of 1
 SithAnnihilator
09-08-2006, 9:10 PM
#1
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.
 Lit Ridl
09-09-2006, 2:14 AM
#2
May be more things?
If you need I may help.
 SithAnnihilator
09-09-2006, 2:57 AM
#3
My sleep deprivation must be gettin to me because you really lost me lit ridl.
 Pavlos
09-09-2006, 5:21 AM
#4
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. :)
Page: 1 of 1