Jump to content

Home

If dead conditional


Canderis

Recommended Posts

I need a script that checks if certain NPC's are dead. This is for a dialog so it should be for determining when new dialog becomes available. I need it for 3 npc's.

n_dt

n_dn

n_ds

Also I need a script that spawns an npc when another one is dead.

Link to comment
Share on other sites

I assume it means the script returns true only when all three NPCs are dead.

 

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

 

For the spawning script:

 

void main() {
  if( GetIsDead( GetObjectByTag( "NPCToCheck" ) ) )
     CreateObject( OBJECT_TYPE_CREATURE, "NPCToSpawn", Location( Vector( 0.0, 0.0, 0.0 ), 0.0 ) );
}

 

- Star Admiral

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...