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.

I need another script...

Page: 1 of 1
 Exile007
01-13-2008, 10:48 PM
#1
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.
 DarthJebus05
01-13-2008, 11:01 PM
#2
 Exile007
01-14-2008, 10:33 AM
#3
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.
 DarthJebus05
01-14-2008, 8:15 PM
#4
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.
 Exile007
01-14-2008, 8:25 PM
#5
I did, still doesn't fix the problem.
 DarthJebus05
01-14-2008, 8:46 PM
#6
What mods do you have in your Override?
 Exile007
01-14-2008, 8:57 PM
#7
Just force power mods, and some of the scripts that tk102 gave aren't compiling...
 DarthJebus05
01-14-2008, 9:05 PM
#8
Post the scripts you're using please.
 Exile007
01-16-2008, 12:44 AM
#9
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.

}
 DarthJebus05
01-16-2008, 1:12 AM
#10
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 ;)
 stoffe
01-16-2008, 7:59 AM
#11
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();
}
 Exile007
01-16-2008, 7:06 PM
#12
Awesome, it finally works! Thanks you guys, I really appreciate the help.
Page: 1 of 1