View Single Post
Old 05-16-2012, 09:51 AM   #3
Trex
Forumite
 
Trex's Avatar
 
Join Date: Dec 2006
Location: UK
Posts: 502
Veteran Modder 
I see.

So, in theory, if I add a script into the actual conversation to reset the local boolean to false each time, it should work?

EDIT : SOLUTION FOUND

Add a little to the end of the script to reset it (using a seperate script doesn't really work)

Code:
void main() {
   int nFlag = IntToFloat( GetCurrentHitPoints( OBJECT_SELF ) ) < ( 0.1 * GetMaxHitPoints( OBJECT_SELF ) );
   if( nFlag && !GetLocalBoolean( OBJECT_SELF , 10 ) ) {
      SetLocalBoolean( OBJECT_SELF, 10, TRUE );
      SetMinOneHP( OBJECT_SELF, FALSE );

CancelCombat(OBJECT_SELF);
        SurrenderToEnemies();
        ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_NEUTRAL);

        object oNPC=GetObjectByTag("syyth");
  location lMe=GetLocation(GetFirstPC());
    ActionDoCommand(SetCommandable(TRUE,oNPC));
  AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
  DelayCommand(0.5, SetLocalBoolean( OBJECT_SELF, 10, FALSE ));
   }
  
}


KNIGHTS OF THE OLD REPUBLIC : THE JEDI MASTERS
PLAY THE TOTAL CONVERSION MOD NOW! . | If you're interested, my almighty fanfic can be read here.

Last edited by Trex; 05-16-2012 at 11:49 AM.
Trex is offline   you may: quote & reply,