Now i need help with Text parser when two chars in the same room

Started by Dr Fred Rubacant Edison, Mon 04/12/2006 03:50:14

Previous topic - Next topic
Its just a test I'm doing. But I'm trying to make it so you can Talk to NPC by typeing useing the Text parser It works real good But
only if one NPC is in the room at a time if not they both talk   GRRR

I been working on this for a few hours

When 2 NPC are in the same room   both say someing and i only Want  one of them to talk to me The NPC thats in Dialog Mode:

here some code


   #sectionstart dialog_request  // DO NOT EDIT OR REMOVE THIS LINE


function dialog_request (int param){ 



if(cSyd.room)  // If your in the room  And what Char you are
{
  if (Parser.Said("whats going on")) { // you Type
 
  cSyd.Say("Whats going on");  // What you say
 
 
  if(cBernhard)  // NPC just a test // i want this NPC only to talk if I'm in Dailog with him
  {
   cBernhard.Say("Nothing Much");  // what they say   
  }
 
  if(cDrfreddytest) // NPC the same // i want this NPC only to talk if I'm in Dailog with him
  {
     cDrfreddytest.Say("Takeing over the WORLD");  // and so on
     }
}

  }   





I need to state that the one I'm talking to will only talk back

Im useing 

// script for Character 106 (Dr Freddy Test): Talk to character



if(player.Room == cDrfreddytest.Room)  // All Chars
{
dDrFreddy.Start();

player.FaceCharacter(cDrfreddytest);

cDrfreddytest.FaceCharacter(player);

}






// script for Character 4 (Bernard): Talk to character



if(player.Room == cBernhard.Room)  // All Chars
{
dTalktest1.Start();

player.FaceCharacter(cBernhard);

cBernhard.FaceCharacter(player);





//Cant get the [ code ] tags when posting code to work when posting


Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!


SMF spam blocked by CleanTalk