View Full Version : How do I stop Using force powers on myself?

06-24-2004, 04:51 PM
is there something i can do in the spells.2da file that will make me stop force killing myself? I must know!

Darth Khasei
06-24-2004, 04:55 PM
?????????? What force power are you using?

06-24-2004, 05:10 PM
all of them. I am making a mod that turns all hostile powers into friendly ones so you can use them on non-hostile NPC's, One of which includes force jump but I keep using these powers on myself. How did you make yours friendly and not have them be used on yourself Darth Khasei?

06-24-2004, 05:56 PM
Use the GetIsFriend function as in
if (!GetIsFriend(oTarget) {
}This differs from the normal hostile force power that uses:
if (GetIsEnemy(oTarget) {
// spell!
} You will not be able to kill your party NPCs, but you will also not kill yourself.

06-24-2004, 06:37 PM
Dang, thought I could do it without scripting as the force powers all end up in the friendly spot after spells.2da editing. Anyways, do these force powers have .nss files somewhere because I don't think .ncs is editable.

Darth Khasei
06-24-2004, 07:03 PM
Well after a ton of testing and minor scripting changes I was able to get the targeting correct about 95% of the time for large groups of enemies and 100% for smaller groups.

TK has recommended the best way to do it, I have nothing to add.

06-24-2004, 07:07 PM
In spells.2da there's a field called impactscript and that's the script that gets called. For most it's k_sp1_generic and that script has k_inc_force as its include script which is where all the powers are handled. The source is in scripts.bif.

06-24-2004, 07:18 PM
Ok, ill give it a try. Thanks.