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.

How do I stop Using force powers on myself?

Page: 1 of 1
 mgnails
06-24-2004, 4:51 PM
#1
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, 4:55 PM
#2
?????????? What force power are you using?
 mgnails
06-24-2004, 5:10 PM
#3
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?
 tk102
06-24-2004, 5:56 PM
#4
Use the GetIsFriend function as in
if (!GetIsFriend(oTarget) {
//spell!
}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.
 mgnails
06-24-2004, 6:37 PM
#5
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, 7:03 PM
#6
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.
 tk102
06-24-2004, 7:07 PM
#7
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.
 mgnails
06-24-2004, 7:18 PM
#8
Ok, ill give it a try. Thanks.
Page: 1 of 1