Jump to content

Home

Dialog scripting


Canderis

Recommended Posts

TSL:

 

For this mod I am working on I want to talk to the a placable (I put a start dialog script in the onuse script slot in the placable's utp file) and then after the dialog is finished to spawn 3 npcs (working). After you kill them you talk to the placable again and it should play a new line. StarAdmiral gave me this script:

int StartingConditional() {
  if( GetIsDead( GetObjectByTag( "n_dt" ) ) && GetIsDead( GetObjectByTag( "n_dn" ) ) && GetIsDead( GetObjectByTag( "n_ds" ) ) )
     return TRUE;
  return FALSE;
}

 

I have this compiled and put in the first conditional slot. But when I talk to the placable again after they are dead, the placable plays the first dialog option again. What can I do to fix this?

Link to comment
Share on other sites

put this in the first dialog(one they are alive)

 

int StartingConditional() {
  if( !GetIsDead( GetObjectByTag( "n_dt" ) ) && !GetIsDead( GetObjectByTag( "n_dn" ) ) && !GetIsDead( GetObjectByTag( "n_ds" ) ) )
     return TRUE;
  return FALSE;
}

 

should be good

 

Nirran

Link to comment
Share on other sites

put this in the first dialog(one they are alive)

 

int StartingConditional() {
  if( !GetIsDead( GetObjectByTag( "n_dt" ) ) && !GetIsDead( GetObjectByTag( "n_dn" ) ) && !GetIsDead( GetObjectByTag( "n_ds" ) ) )
     return TRUE;
  return FALSE;
}

 

should be good

 

Nirran

 

 

Conditional slot?

Link to comment
Share on other sites

The first dialog node should be the dialog that fires after the NPCs are dead. Use this script in the conditional slot:

 

int StartingConditional() {
  if( GetIsDead( GetObjectByTag( "n_dt" ) ) && 
      GetIsDead( GetObjectByTag( "n_dn" ) ) && 
      GetIsDead( GetObjectByTag( "n_ds" ) ) &&
      GetLocalBoolean( OBJECT_SELF, 40 ) )
     return TRUE;
  return FALSE;
}

 

Add SetLocalBoolean( OBJECT_SELF, 40, TRUE ); to the last line of the NPC spawning script.

 

- Star Admiral

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...