Umm, can someone make a Script that makes an NPC neutral once it hits a certain number of VP. Like someone battling a jedi and once the jedi hits one VP the battle stops and dialog begins. I'd really appreciate it if one of you could do this.
Um, I followed that tutorial and got the scripts, but for some reason, the invinciblity is still turned on. I can't 'end' the fight.
Download Kotor Saved Game Editior (KSE), open it, find your save game and check if the Min 1 HP thing is on Yes. If it is, put it on No and that should fix it.
I did, still doesn't fix the problem.
What mods do you have in your Override?
Just force power mods, and some of the scripts that tk102 gave aren't compiling...
Post the scripts you're using please.
First one:
int StartingConditional() {
int nResumeTalk = GetLocalBoolean(OBJECT_SELF,0);
return nResumeTalk;
}
I can't find the one that turns the enemy hostile, but that one is working fine.
So next, this one won't compile
void main()
{
//
GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED);
GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT);
GN_SetListeningPatterns();
GN_WalkWayPoints();
}
And the last one, I think this one is to turn off the immortality.
void main()
{
int nCurrentHP;
int nUser = GetUserDefinedEventNumber();
if(nUser == 1006) // DAMAGED
{
nCurrentHP=GetCurrentHitPoints();
if (nCurrentHP<10) {
CancelCombat (OBJECT_SELF);
ClearAllActions();
ChangeToStandardFaction(OBJECT_SELF, 5);
//
SetLocalBoolean(OBJECT_SELF,0,TRUE);
//
SetMinOneHP(OBJECT_SELF,FALSE);
object oPC=GetFirstPC();
ActionDoCommand(ActionStartConversation(oPC));
}
}
And yeah, the enemy won't change back to neutral, and it's invincible.
}
void main()
{
int nCurrentHP;
int nUser = GetUserDefinedEventNumber();
if(nUser == 1006) // DAMAGED
{
nCurrentHP=GetCurrentHitPoints();
if (nCurrentHP<10) {
CancelCombat (OBJECT_SELF);
ClearAllActions();
ChangeToStandardFaction(OBJECT_SELF, 5);
//
SetLocalBoolean(OBJECT_SELF,0,TRUE);
//
SetMinOneHP(OBJECT_SELF,TRUE);
object oPC=GetFirstPC();
ActionDoCommand(ActionStartConversation(oPC));
}
Try that ;)
I can't find the one that turns the enemy hostile, but that one is working fine.
So next, this one won't compile
(snip)
In order to compile that script you need the line...
#include "k_inc_generic"
...at the top of the script. The script contains custom functions that will not be found unless you use the proper include file.
That you haven't compiled the OnSpawn script is most likely the cause of your problem, since the second script (which stops the fight) will not do anything at all without the setting it toggles.
#include "k_inc_generic"
void main() {
GN_SetSpawnInCondition( SW_FLAG_EVENT_ON_DAMAGED );
GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT );
GN_SetListeningPatterns();
GN_WalkWayPoints();
}
Awesome, it finally works! Thanks you guys, I really appreciate the help.