View Single Post
Old 05-16-2012, 09:33 AM   #1
Trex
Forumite
 
Trex's Avatar
 
Join Date: Dec 2006
Location: UK
Posts: 505
Veteran Modder 
Talk, fight, talk, fight, talk problem

Hi all.

I'm trying to put together a big duel which is in 4 parts. You fight, talk, then fight, then talk etc.

I have this this script in the utc's ScriptDamaged :

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()));
   }
  
}
Which works fine, but only for the first round. After the first mid-fight conversation has happened, my baddie just keeps fighting and never turns to neutral and talks to you a second time.

How can I make this work?


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.
Trex is offline   you may: quote & reply,